# FAT filesystems on UTF8 system

## VinzC

Hi all.

I'm sharing USB disks and keys between Windows and Gentoo machines. FAT filesystems seem to correctly use an ASCII character set -- in Windows, files with accented characters appear correctly in Explorer. From Gentoo all these characters appear with a question mark in XFCE Thunar. I must remount FAT filesystems with iocharset=utf8 if I want accented characters to be displayed properly but it looks like it's not a good idea  :Rolling Eyes:  . I made sure my kernel uses CP437 for FAT filesystems.

```
CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
```

I'd like special characters to appear correctly in XFCE. What/how am I supposed to do?

Thanks in advance for any hint/suggestion.

----------

## Rexilion

I don't think that cp437 supports the characters you are talking about. Perhaps you should try:

CONFIG_FAT_DEFAULT_IOCHARSET="utf8"

Altough it's not recommended for a reason...

----------

## VinzC

Thanks. I can still change the codepage to 1250 (which is closer to that of Windows, 1252). However I just wonder why iocharset=utf8 is discouraged?

----------

## VoidMage

Actually, most important option for FAT is not 'iocharset=utf8',

but simply 'utf8'.

----------

## VinzC

 *VoidMage wrote:*   

> Actually, most important option for FAT is not 'iocharset=utf8',
> 
> but simply 'utf8'.

 

I see. Now is there a way to pass that mount option to XFCE4? Or does it use HAL?

----------

## Rexilion

 *VinzC wrote:*   

>  *VoidMage wrote:*   Actually, most important option for FAT is not 'iocharset=utf8',
> 
> but simply 'utf8'. 
> 
> I see. Now is there a way to pass that mount option to XFCE4? Or does it use HAL?

 

On one of my explorations of Gentoo I found this little file:

/etc/xdg/xfce4/mount.rc

Which contains the following lines:

 *Quote:*   

> # This file contains the mount option configuration when exo-mount is used with the HAL
> 
> # back end (which is highly recommended). If mounting using exo is somehow not working
> 
> # for you, you can copy this file to your $XDG_CONFIG_HOME/xfce4 directory and modify it.
> ...

 

and guess what?

 *Quote:*   

> #   volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime',
> 
> #                                 'noexec', 'quiet', 'remount', 'exec', 'uid=',
> 
> #                                 'gid=', 'umask=', 'utf8'} (string list)
> ...

 

I don't think it can get any better than this   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## VinzC

Excellent! Thanks a whole bunch  :Smile:  .

----------

