Accents replaced in files name

Posted by meaz 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Accents replaced in files name
February 07, 2016 11:41AM
Hi all,

when I upload a file that contains accent (ex: cinéma), the uploaded file's name is changed : the accent is replaced by a "?" (ex: cin?ma).

How could I fix that?

Thanks!



Edited 1 time(s). Last edit at 02/07/2016 12:03PM by meaz.
Re: Accents replaced in files name
February 07, 2016 01:11PM
Hi,
this is a common problem, which we also encounteres on LibraryBox.

This can't be solved in an easy way. You can try add a mount option, which will reduce the problem, but maybe not solve it for 100% sad smiley

Following steps:

* Login to your box
* edit the file /etc/config/fstab
vi /etc/config/fstab
* Find the section containing the mount options for /mnt/usb (I currently don't have an example ready to copy)
* Add the following entry
,utf8=1
* Save, and reboot.

Maybe you want to post a copy of your configuration file before saving and rebooting, then we will review it.


This is only my signature.
Re: Accents replaced in files name
April 06, 2016 01:57PM
Hi Matthias,

thanks for the answer, and sorry that I've been so long to test what you suggested...

It actually doesn't work.

Here is my modified /etc/config/fstab
root@piratebox:~# vi /etc/config/fstab
        option target '/mnt/usb'
        option device '/dev/sda1'
        option fstype 'auto'
        option options 'umask=0,noatime,rw,utf8=1'
        option enabled_fsck '0'
        option enabled '1'
                
config pirateswap 'swap'
        option device '/mnt/usb/external_fs/OpenWRT.swap'
        option enabled '1'

config mount 'piratebox'
        option target '/mnt/ext'
        option device '/mnt/usb/external_fs/OpenWRT.img'
        option options 'loop'
        option enabled '1'

config mount 'pirateimage'
        option target '/opt/piratebox'
        option device '/mnt/usb/PirateBox/pbIMG_ws.img'
        option options 'loop'
        option enabled '1'

When I upload a file with accent (bothering french people!!), it uploads, on the "website" it appears with the accent, but if I plug my usb stick into a computer to check the files, the accents have been removed...

Thanks again!

Meaz
Re: Accents replaced in files name
April 06, 2016 06:15PM
I think I worked a total of a complete week to get it working in every condition for LibraryBox.
There is no easy solution for that, especially because even Windows and Unix are mixing up things.

For each step, I need a hexdump of the directory and so on.
I know that is very annoying.

Question: Are the files still downloadable ?

Maybe you can try to adjust the HEADER.txt to enforce utf-8 encoding on the directory listing.
Re: Accents replaced in files name
April 07, 2016 10:07AM
Hi Matthias,

thanks a lot for your quick answer. Is the problem coming of droopy?

To answer your question, yes, the files are still downloadable. And there are no problem with the directory listing: it shows the name perfectly. The problem comes when I stop the piratebox, and plug my usb stick into my computer...

Best,

meaz
Re: Accents replaced in files name
April 07, 2016 05:42PM
Hi,
no, then the problem is a mix of the encoding.

Droopy & directory listing shows everything perfectly in UTF-8.
But the filesystem is mounted with ISO codepage, when you put it back to your computer. Then your computer is confused winking smiley, because the utf8 chars do not fit with the ISO encoding

Matthias
Re: Accents replaced in files name
April 08, 2016 07:03AM
Hi Matthias,

thanks again for your time... I'm not too good with filesystem and charts. Do you mean that the problem is coming from my windows 10 laptop: when I plug the USB key, it mounts it with a ISO codepage filesystem? If that is the case, can I force the mounting to be in utf8 (in windows?)

Best

meaz

PS: f...ing accent!
Re: Accents replaced in files name
April 11, 2016 03:30PM
Yes, I totally assume that.
As long as you stay in one context, you don't have a big issue.

And I don't think Windows10 is able to mount FAT32 as UTF8, I guess it is not designed so.
Re: Accents replaced in files name
April 11, 2016 04:26PM
Hi,

just to let you know, I tested on kubuntu: it is the same problem...

Best
Re: Accents replaced in files name
April 14, 2016 07:46PM
how did you mount the usb stick?
Re: Accents replaced in files name
April 15, 2016 02:19PM
on the piratebox? It is automatic.

on my laptop? It is also automatic...

smileys with beer