Coder Social home page Coder Social logo

Comments (6)

earlephilhower avatar earlephilhower commented on May 20, 2024

Somehow wmic is reporting something very weird on your system. each drive entry should be 2-3 bytes (i.e. C:), not >200, and there shouldn't be anything outside plain ASCII.

Can you open a cmd window and run wmic path win32_logicaldisk get deviceid, volumename, filesystem, drivetype and post the output to let us see what the script is seeing?

from arduino-pico.

Bodmer avatar Bodmer commented on May 20, 2024

I suspect a volume name has an accented character. Although these are in the range 128-255, some in that range get utf8 encoded.

from arduino-pico.

al1fch avatar al1fch commented on May 20, 2024

Thanks ! Solved
No bug ,the problem was on my side : µ character in a volume name
Here was the result of mentionned windows cmd :

DeviceID  DriveType  FileSystem  VolumeName
C:        3          NTFS
D:        3          NTFS
E:        3          FAT32
F:        2          FAT32       µSD

Solved

from arduino-pico.

Bodmer avatar Bodmer commented on May 20, 2024

Makes sense, mu is 0xE6 in the French extended character set. So the volume name is reported in pure ASCII but is being interpreted in Python as utf8 encoded, and then it is an illegal sequence. So it is a bug, since the extended character set is allowed in Windows volume names.

from arduino-pico.

earlephilhower avatar earlephilhower commented on May 20, 2024

Well, not pure ASCII as that would only have from 0..127, but in the Windows codepage for French which is definitely not UTF-8!

It's a pain because the upload tool is itself from Microsoft(!!!) and they mixed up codepages and utf-8. If SO is correct, WMIC uses the codepage for piped outputs but changes to Unicode if redirected to a file.

from arduino-pico.

earlephilhower avatar earlephilhower commented on May 20, 2024

Oh, and thanks @al1fch for following up. Now that I know how to repro on Windows, I can try and find a solution. Powershell, maybe, as I think that's always unicode...

from arduino-pico.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.