Re: freebsd and utf-8 directory names

From: Gyrd Thane Lange <gyrd-se_at_thanelange.no>
Date: Tue, 01 Jul 2014 17:29:55 +0200
Den 30. juni 2014 08:56, skrev Rainer Hurling:
> Am 30.06.2014 08:30 (UTC+1) schrieb M&S - Krasznai András:
>> Hi
>>
>> I have been using FreeBSD as desktop since 2003, and living in a mixed (windows-linux) environment I installed FreeBSd along with my usual (Windows 7) work environment, I have a dualboot configured laptop. I use FreeBSD-10 STABLE.
>>
>> There is a partition formatted for FAT32 where I store documents which I would like to view (and edit) both in  windows and freebsd.
>>
>> The problem is that if the path name contains certain Hungarian characters (e.g o with double accent), then libreoffice in FreeBSD refuses to open them complaining about illegal characters. The directory was created in windows, the document also, and I can handle them perfectly from windows (what is more, libreoffice under a linux can also open those documents). Some accented characters are shown as a question mark in FreeBSD, and some others are as a black rectangle; these latter are causing problems. If a file-nam contains such characters then the file is shown as 0- length in Midnight Commander.
>>
>> I tried some steps described in the „Localization” part of the FreeBSD Handbook, but things did not improve.
>>
>> I installed PC-BSD with Hungarian language support, thinking that it would handle the localized directory names correctly but no, it gives the same error message.
>>
>> This problem is really annoying. How could I solve it?
>
> In my German environment I also use FAT32 formatted drives, mounted like:
>
> /dev/adaXsX	/XXX	msdosfs	rw,large,-Lde_DE.UTF-8	0	0
>
> This should also work for Hungarian?

I second this advice, it should work well for any language (It certainly 
is fine for my Norwegian).

To expand on Rainer's suggestion:

The -L parameter in the mount line is from the mount_msdosfs(8) utility. 
The man page says:

-L locale
Specify locale name used for file name conversions for DOS and Win'95 
names.  By default ISO 8859-1 assumed as local character set.


The locale of your environment and mount command must match. In my case 
it is:

LC_CTYPE=no_NO.UTF-8
mount_msdosfs -L no_NO.UTF-8 /dev/da3s1 /mnt/tmp


(Regarding whether the default of ISO 8859-1 for mount_msdosfs should be 
changed to some UTF-8 locale to better match what people are using in 
this age is an entirely different matter. ;-)

Best regards,
Gyrd ^_^

>
> HTH,
> Rainer Hurling
>
>
>> Krasznai András
>> rendszermérnök
>> M&S Informatikai Zrt.
>> 1136 Budapest, Pannónia u. 17/A.
>> Telefon: +36   1 703-2923
>> Mobil:    +36 30 703-2923
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
Received on Tue Jul 01 2014 - 13:30:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:50 UTC