# UFS and UTF8 chars



## Seeker (Jan 1, 2013)

I have NFS exported folder on FreeBSD machine.
NFS client is Win7

When I copy 'ÄÄ‡Å¡Ä‘_lo.jpg' file, to NFS server, in open file browser I see UTF8 chars, as they are on Win7.
However, doing 'ls' in console, I get:

```
-rwx------  1 root  wheel  -   30k ????_lo.jpg
```

In '/etc/login.conf' I have required parts:

```
default:\
        :charset=UTF-8:\
        :lang=en_US.UTF-8:\
```

So what is a problem?


----------



## xibo (Jan 1, 2013)

Your terminal might not support UTF-8.


----------



## xtaz (Jan 2, 2013)

The OP mentioned that they can't see the characters on the "console". The console does not support UTF8 which is why it looks like this. It only supports some really ancient standard which I can't remember what it is exactly. Use a remote SSH terminal like PuTTY running in UTF8 translation mode (in PuTTY this is in the settings Window, Translation, Remote Character Set) and it should look fine. You can improve the UTF8 support on the console by recompiling the kernel with these options below, however it still doesn't work all that well but it's slightly better than without. Basically it needs far more work by the developers to improve this and it's probably not high on the list of priorities.


```
options         SC_PIXEL_MODE
options         VESA
options         TEKEN_UTF8
```

Also after editing that /etc/login.conf make sure you run this: `# cap_mkdb /etc/login.conf`


----------



## Seeker (Jan 2, 2013)

In PuTTY, I did set it to UTF-8 and result is same: *????_lo.jpg*
However, if I cat file, with UTF-8 chars, they are correctly displayed, but listing file names in dir, with UTF-8 chars, they remain same.

I have first 2 options:

```
options         SC_PIXEL_MODE
options         VESA
```
I must see what exactly does:

```
options         TEKEN_UTF8
```
As if it is experimental, I won't use it.


----------



## Seeker (Jan 2, 2013)

Well, hell with it!
I'm compiling kernel now, with added:

```
# Enable experimental features of the syscons terminal emulator (teken).
options         TEKEN_CONS25            # cons25-style terminal emulation
options         TEKEN_UTF8              # UTF-8 output handling
```


----------



## Seeker (Jan 2, 2013)

Nope! It didn't work.
The only solution, for console, is to use *$*something from ports.


----------



## xtaz (Jan 3, 2013)

Weird. I have no problems with using PuTTY. You have definitely run the cap_mkdb command after editing /etc/login.conf? Make sure you are definitely using UTF8:


```
$ set | egrep 'CHARSET|LANG'
LANG=en_GB.UTF-8
MM_CHARSET=UTF-8
```

Also I notice in the stuff you pasted in the original post you have a \ after your second line. Is it the last line of the default section or are there others underneath it? Not sure if it matters but if it's the last line there probably shouldn't be a \ there.

Just showing this works for me:


```
# touch ÄÄ‡Å¡Ä‘_lo.jpg
# ls -al *.jpg
-rw-r--r--  1 root  wheel  0  3 Jan 09:35 ÄÄ‡Å¡Ä‘_lo.jpg
```


----------



## Seeker (Jan 3, 2013)

xtaz said:
			
		

> Weird. I have no problems with using PuTTY. You have definitely run the cap_mkdb command after editing /etc/login.conf? Make sure you are definitely using UTF8:
> 
> 
> ```
> ...


In tcsh shell:

```
# setenv | grep -E 'CHARSET|LANG'
MM_CHARSET=UTF-8
LANG=en_US.UTF-8
```



> Also I notice in the stuff you pasted in the original post you have a \ after your second line. Is it the last line of the default section or are there others underneath it? Not sure if it matters but if it's the last line there probably shouldn't be a \ there.


It is a code snip.


> Just showing this works for me:
> 
> 
> ```
> ...


It works in xterm and other terminals like urvxt.
I am talking about console only, the lowest level of interaction.


----------



## xtaz (Jan 3, 2013)

Seeker said:
			
		

> It works in xterm and other terminals like urvxt.
> I am talking about console only, the lowest level of interaction.



Sorry I'm confused then because you said this suggesting it didn't work in remote terms either:



			
				Seeker said:
			
		

> In PuTTY, I did set it to UTF-8 and result is same: ????_lo.jpg



Yes, the console UTF-8 support is pretty bad. You can improve it slightly by adding the kernel stuff that I mentioned which allows it to show some characters, but this needs far more development. If you really want UTF-8 on the console it might be better to run a minimal X window manager like blackbox and use some xterms etc inside that.


----------



## Seeker (Jan 3, 2013)

Thanks.
Under desktop, there is 0, UTF-8 related problems.


----------

