UFS and UTF8 chars

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:
Code:
-rwx------  1 root  wheel  -   30k ????_lo.jpg

In '/etc/login.conf' I have required parts:
Code:
default:\
        :charset=UTF-8:\
        :lang=en_US.UTF-8:\

So what is a problem?
 
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.

Code:
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
 
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:
Code:
options         SC_PIXEL_MODE
options         VESA
I must see what exactly does:
Code:
options         TEKEN_UTF8
As if it is experimental, I won't use it.
 
Well, hell with it!
I'm compiling kernel now, with added:
Code:
# Enable experimental features of the syscons terminal emulator (teken).
options         TEKEN_CONS25            # cons25-style terminal emulation
options         TEKEN_UTF8              # UTF-8 output handling
 
Nope! It didn't work.
The only solution, for console, is to use $something from ports.
 
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:

Code:
$ 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:

Code:
# touch čćšđ_lo.jpg
# ls -al *.jpg
-rw-r--r--  1 root  wheel  0  3 Jan 09:35 čćšđ_lo.jpg
 
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:

Code:
$ set | egrep 'CHARSET|LANG'
LANG=en_GB.UTF-8
MM_CHARSET=UTF-8
In tcsh shell:
Code:
# 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:

Code:
# touch čćšđ_lo.jpg
# ls -al *.jpg
-rw-r--r--  1 root  wheel  0  3 Jan 09:35 čćšđ_lo.jpg
It works in xterm and other terminals like urvxt.
I am talking about console only, the lowest level of interaction.
 
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.
 
Back
Top