liuervehc / nxmtp

389 stars 30 forks source link

Unable to copy files with filenames with special characters. #7

Open DarkMatterCore opened 5 years ago

DarkMatterCore commented 5 years ago

I discovered this trying to copy a file called "pokémon.jpg". Give it a try.

Replacing the "é" (0xE9) with an "e" (0x65) fixed the issue for me, which led me to believe that the application only handles characters in the ASCII range (0x20 - 0x7F).

If I'm not mistaken, MTP should be capable of handling UTF-8 character encoding, so this could perhaps be fixed.

Masamune3210 commented 5 years ago

I'm not sure it's a issue with mtp so much as a issue with libnx and accented chars. A lot of Homebrew have the same issue with not being able to process accents correctly

liuervehc commented 5 years ago

This is exactly due to the application's handling of string data during object creation and will be corrected.

fennectech commented 5 years ago

Fat32 cannot handle special charicters.

Masamune3210 commented 5 years ago

Forgot about that, yeah the only special chars that stock fat32 supports is ~!@#$%^&()_-{},.=[]`' All of the grave chars and stuff like that are way out of range

fennectech commented 5 years ago

An intelligent error message would do. “File name not supported on target file system”perhaps.

Masamune3210 commented 5 years ago

I'm not sure that would be possible to show on the computer side as that's up to the os on how to handle errors. Could show something on the switch though

fennectech commented 5 years ago

Im just hoping for KIP support. xD

fennectech commented 5 years ago

Additionaly. I recomend not even trying to support exfat as its so poorly implimented that your just asking for trubble with a tool like this.

AnalogMan151 commented 5 years ago

The Switch filesystem won't handle anything but ascii characters on either FAT32 or exFAT so those file would need to be renamed regardless.

fennectech commented 5 years ago

This project is kinda dead anyways :/