Timeline for Why non-ASCII characters are displayed using a question mark?
Current License: CC BY-SA 3.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 23, 2017 at 11:33 | history | edited | CommunityBot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
| Mar 20, 2017 at 9:24 | comment | added | Grynium | @JuliePelletier I confirm the problem was caused by the mount. Many thanks for your precious help | |
| Mar 20, 2017 at 9:24 | vote | accept | Grynium | ||
| Mar 20, 2017 at 9:22 | vote | accept | Grynium | ||
| Mar 20, 2017 at 9:24 | |||||
| Mar 20, 2017 at 9:22 | answer | added | Grynium | timeline score: 0 | |
| Mar 20, 2017 at 8:44 | comment | added | Grynium |
@JuliePelletier after your suggestion regarding mount options I've checked the mount of the pendrive I'm using for test, it's:/dev/sda1 on /media type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro). I think the problem can be related to the iocharset option
|
|
| Mar 20, 2017 at 8:37 | comment | added | Grynium |
@JuliePelletier this it the output of the "ls | od -tx1 -tc" command: fòò.dàt -> 62 e0 72 2e 64 e0 74 0a 66 f2 f2 2e 64 e0 74 0a and bàr.dàt -> b 340 r . d 340 t \n f 362 362 . d 340 t \n
|
|
| Mar 18, 2017 at 23:21 | history | edited | Gilles 'SO- stop being evil' |
edited tags
|
|
| Mar 17, 2017 at 18:21 | comment | added | Julie Pelletier |
Also, if you're missing a locale, just add it with locale-gen.
|
|
| Mar 17, 2017 at 18:18 | comment | added | Julie Pelletier |
@Grynium: The command ls | od -tx1 -tc should return an octal and textual representation of ls in the current directory. Perhaps you are not running it at the right place?
|
|
| Mar 17, 2017 at 17:23 | comment | added | Grynium | "ls | LC_ALL=C sed -n l" doesn't return anything. "ls | od -tx1 -tc" returns 0000000. What is the meaning of these commands? | |
| Mar 17, 2017 at 16:50 | comment | added | Stéphane Chazelas |
Sorry typo, I meant sed, not send. Or use od -tx1 -tc
|
|
| Mar 17, 2017 at 16:25 | comment | added | Grynium | @StéphaneChazelas: I don't have "send" on my BSP, I'll try to add it. I confirm that "ls" supports localization, I tried to set zh_CN locale (export LANGUAGE=zh_CN) and "ls --help" shows the man in chinese, see:"用法:ls [选项]... [文件]..." | |
| Mar 17, 2017 at 16:19 | comment | added | Grynium | @JuliePelletier: I don't have any en_US.UTF-8 locale on my embedded system, en_US is the UTF-8 encoded version. I've checked the file name using the answer provided here: unix.stackexchange.com/a/351899/191458, e.g. fòò.dàt is encoded as: 66 c3 b2 c3 b2 2e 64 c3 a0 74, that corresponds to UTF-8 | |
| Mar 17, 2017 at 16:13 | comment | added | Stéphane Chazelas |
Either those characters are not recognised as printable in the locale (unlikely), or more likely, the mount options of the device make it that the file names are translated to a different charset. What's the output of ls | LC_ALL=C send -n l on the embedded system? Or it could very well be that that ls doesn't support localisation (though I'd expect to see f????.d??t if it were UTF-8 characters).
|
|
| Mar 17, 2017 at 16:07 | history | edited | Grynium | CC BY-SA 3.0 |
Add of the supported locales
|
| Mar 17, 2017 at 15:57 | comment | added | Julie Pelletier |
Have you verified your assertion by setting the locale correctly? (en_US.UTF-8) Do you have a clue on how the file names are actually written on the disk? It may not be UTF at all. You should do some tests that don't rely on the existing saved file names to make sure the communication link is not partially responsible for the issue either.
|
|
| Mar 17, 2017 at 15:49 | history | asked | Grynium | CC BY-SA 3.0 |