This is probably a often-asked question, but I cannot get it working.
I'm not using a graphical interface, just the hardware console. I've created a file with a unicode character ('ä') with Windows 7 and saved it to a usb stick. After I've mounted it on my Pi 3 running Raspbian I cd'ed to the directory and did a ls the unicode character is then encoded as a question mark '?'. I then generated locales using raspi-config (de_DE.utf8, de_DE.iso88591, de_DE.iso885915@euro) but whenever I try to do LANG=de_DE.theencoding ls I get a question mark.
I want to be able to list the filename with the correct characters in place.
Re: ls unicode characters
If a drive contains unicode characters just add "iocharset=utf8" to the mount command.
Re: ls unicode characters
Unfortunately, the standard automount on Raspbian sets iocharset=ascii, and I'm not quite sure how one would set those options. It's not in /etc/fstab
I agree with the OP that it is a little off-putting seeing the file in the file manager as ‘testäéïôü.txt’, but showing up in the shell as ‘test�����.txt’
I agree with the OP that it is a little off-putting seeing the file in the file manager as ‘testäéïôü.txt’, but showing up in the shell as ‘test�����.txt’
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him
Pronouns: he/him
- DougieLawson
- Posts: 42153
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: ls unicode characters
The GUI automounter is part of PCManFM, there may be some tweakable options in that.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: ls unicode characters
Okay, I think I've got a working solution:
I note, though, that the system still thinks this has iocharset=ascii in the mount options. I suspect that something, somewhere is a little confused about the status.
(and Dougie, I'm pretty sure that udisks2 catches automounts before PCManFM)
- sudo apt install udisks-glue
- edit /etc/udisks-glue.conf (you'll need to use sudo), and make sure that the post_insertion_command line contains --mount-options sync,iocharset=utf8
I note, though, that the system still thinks this has iocharset=ascii in the mount options. I suspect that something, somewhere is a little confused about the status.
(and Dougie, I'm pretty sure that udisks2 catches automounts before PCManFM)
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him
Pronouns: he/him
- DougieLawson
- Posts: 42153
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: ls unicode characters
That's useful to know for folks who use automounters (not me).scruss wrote: (and Dougie, I'm pretty sure that udisks2 catches automounts before PCManFM)
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: ls unicode characters
I did not properly unmount my old Mount. I was able to config my auto-mounter (usbmount) to set the options, so thank you for your support.
Last edited by turakar on Thu Dec 22, 2016 2:45 pm, edited 1 time in total.
Re: ls unicode characters
hmm, myabe I should be looking at usbmount instead. Are you running standard Raspbian, or have you done things to it?
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him
Pronouns: he/him
Re: ls unicode characters
I'm running a raspbian without a graphical interface but with usbmount installed using apt. It's just a sudo apt-get install usbmount
. The config is inside /etc/usbmount.
