How to set the default system (locale?) encoding

Tim ignored_mailbox at yahoo.com.au
Fri May 4 05:02:11 UTC 2007


Tim:
>> Also, what's your locale set up to?
>> 
>> e.g. [tim at serge ~]$ locale
>> LANG=en_AU.UTF-8
>> ...[snip]...

Steven P. Ulrick:
> [steve at afolkey2 ByBook]$ locale
> LANG=en_US
> ...[snip]...

Which, if I remember correctly, means you'd be running in ASCII.  You're
not running in UTF-8, that's for sure.  Other encoding schemes would be
explicitly mentioned, in the same way that UTF-8 would be.

> When I saw how yours had ".UTF-8" at the end of each variable, I put
> the following in my .bashrc:
> export LANG="en_US.UTF-8"
> ...[snip]...

I'm not sure if that'll fix the problem for all situations, .bashrc is
for BASH, it shouldn't work on things launched some other way.

> One thing that is kind of interesting.  It intrigued me so much that I
> ran the script that contained all the commands that I used to output
> the Bible into plain text files (by book, for this example)
> With the changes I made that I noted above, "file" says different
> things about some of the files.  I will leave out the files that say
> "UTF-8" in the description:
> 1-03-Leviticus.txt:       ASCII English text, with very long lines
> 2-17-Esther.txt:          ASCII English text, with very long lines
> 3-20-Proverbs.txt:        ASCII English text

UTF-8 starts off the same as ASCII, and changes after the first 127
characters.  If a text file only uses the first 127 characters, then
it's directly interchangeable, and appears just like ASCII.  Once you
need to use characters that ASCII can't represent (proper dashs, quote
symbol, foriegn characters, etc.), then you have to use a different
scheme.  UTF-8 being a good choice, as it covers just about everything
in one go.

-- 
(This box runs FC6, my others run FC4 & FC5, in case that's
 important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.





More information about the fedora-list mailing list