Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2012 02:27:45 +0100
From:      Polytropon <freebsd@edvax.de>
To:        grarpamp <grarpamp@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Character set conversion, locales, UTF-8, etc
Message-ID:  <20121105022745.adc3e4c2.freebsd@edvax.de>
In-Reply-To: <CAD2Ti29qi_kXRYsvPuv873WSrX=x2Gh6cq28BcwsYd5s-t9eog@mail.gmail.com>
References:  <CAD2Ti29qi_kXRYsvPuv873WSrX=x2Gh6cq28BcwsYd5s-t9eog@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 4 Nov 2012 13:36:58 -0500, grarpamp wrote:
> As an aside, why does FreeBSD seem to default to the above locale
> instead of say, en_US.UTF-8 ?

FreeBSD's file system does not default to any locale, as far as I
know. The system is "agnostic" to what the characters in the file
name mean or what symbol they should represent. It's up to the
console font and terminal emulator and font display what you can
see on your screen. In text mode, this is limited and typically
restricted to the fonts included with the system, having to meet
the proper LC_ settings (e. g. de_DE.ISO8859-1 plus iso-8x8/14/16
if you want german characters like umlauts and eszett). There is
no real UTF-8 support on the console. For example, files with
chinese characters will show up as ??????????????. In X, with
a "different than expected" locale, "funny characters" will
typically appear, like A~.1/4..X=B0 upside-down question mark. :-)

That being said, it's up to the application programs (and if it's
just the terminal emulator displaying the output of ls) to deal
with multibyte sequences. They are _valid_ in file names. The
many problems they cause should make programmers pay attention
on if and how to use them. :-)

There isn't much you can do on file system level except renaming
the files: write a program that reads the file names according
to the preferred interpretation and write new names for them,
being more portable (e. g. by translating "problematic" characters
into such that are less problematic).




--=20
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121105022745.adc3e4c2.freebsd>