character sets for file names on ufs?

Pieter de Goeje pieter at degoeje.nl
Thu May 28 19:30:12 UTC 2009


On Thursday 28 May 2009 19:51:45 Tom Worster wrote:
> what character set/encoding is used for file names in freebsd when i have a
> default ufs fs?
>
> tom

None.

UFS is 8 bit clean, so you can basically use it with any 8bit character set. 
No encoding is enforced and no conversion is ever applied to file names on 
UFS.

If you set your locale to UTF-8, you can use unicode characters in filenames.

For instance:

% touch "⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ "
% ls
⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁
% rm ⡍⠜⠇⠑⠹\ ⠺⠁⠎\ ⠁⠎\ ⠙⠑⠁⠙\ ⠁⠎\ ⠁\
%

(I don't have a clue what that means btw)

-- 
Pieter de Goeje



More information about the freebsd-questions mailing list