Re: How to set the default system (locale?) encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 03 May 2007 13:40:42 +0930
Tim <ignored_mailbox@xxxxxxxxxxxx> wrote:

> On Wed, 2007-05-02 at 20:58 -0500, Steven P. Ulrick wrote:
> > I have used the Sword Project's "diatheke" command to output the
> > Bible into plain text files, divided by chapter and book.
> 
> That may be the problem.  Is it creating real UTF-8 text, as Fedora
> usually defaults to?  What do you get if you do a "file" on those text
> files.

[steve@afolkey2 ByBook]$ file 01-Genesis.txt
01-Genesis.txt: UTF-8 Unicode English text, with very long lines

> 
> e.g. [tim@serge ~]$ file example.text
> example.text: UTF-8 Unicode text
> 
> Also, what's your locale set up to?
> 
> e.g. [tim@serge ~]$ locale
> LANG=en_AU.UTF-8
> LC_CTYPE="en_AU.UTF-8"
> LC_NUMERIC="en_AU.UTF-8"
> LC_TIME="en_AU.UTF-8"
> LC_COLLATE="en_AU.UTF-8"
> LC_MONETARY="en_AU.UTF-8"
> LC_MESSAGES="en_AU.UTF-8"
> LC_PAPER="en_AU.UTF-8"
> LC_NAME="en_AU.UTF-8"
> LC_ADDRESS="en_AU.UTF-8"
> LC_TELEPHONE="en_AU.UTF-8"
> LC_MEASUREMENT="en_AU.UTF-8"
> LC_IDENTIFICATION="en_AU.UTF-8"
> LC_ALL=

[steve@afolkey2 ByBook]$ locale
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=
[steve@afolkey2 ByBook]$   

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"
export LC_CTYPE="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_PAPER="en_US.UTF-8"
export LC_NAME="en_US.UTF-8"
export LC_ADDRESS="en_US.UTF-8"
export LC_TELEPHONE="en_US.UTF-8"
export LC_MEASUREMENT="en_US.UTF-8"
export LC_IDENTIFICATION="en_US.UTF-8"
export LC_ALL=

This appears to have fixed my problem completely!

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
3-21-Ecclesiastes.txt:    ASCII English text, with very long lines
4-25-Lamentations.txt:    ASCII English text
4-29-Joel.txt:            ASCII English text
4-31-Obadiah.txt:         ASCII English text
4-32-Jonah.txt:           ASCII English text
4-34-Nahum.txt:           ASCII English text
4-35-Habakkuk.txt:        ASCII English text
4-36-Zephaniah.txt:       ASCII English text, with very long lines
4-37-Haggai.txt:          ASCII English text
4-39-Malachi.txt:         ASCII English text, with very long lines
6-45-Romans.txt:          ASCII English text
6-46-1-Corinthians.txt:   ASCII English text
6-47-2-Corinthians.txt:   ASCII English text, with very long lines
6-48-Galatians.txt:       ASCII English text
6-49-Ephesians.txt:       ASCII English text
6-50-Philippians.txt:     ASCII English text
6-51-Colossians.txt:      ASCII English text
6-52-1-Thessalonians.txt: ASCII English text
6-53-2-Thessalonians.txt: ASCII English text
6-54-1-Timothy.txt:       ASCII English text
6-55-2-Timothy.txt:       ASCII English text
6-56-Titus.txt:           ASCII English text
6-57-Philemon.txt:        ASCII English text
6-58-Hebrews.txt:         ASCII English text
7-59-James.txt:           ASCII English text
7-60-1-Peter.txt:         ASCII English text
7-61-2-Peter.txt:         ASCII English text
7-62-1-John.txt:          ASCII English text
7-63-2-John.txt:          ASCII English text
7-64-3-John.txt:          ASCII English text
7-65-Jude.txt:            ASCII English text
8-66-Revelation.txt:      ASCII English text, with very long lines

Now I don't care that much why this is, since files appear to display
correctly now (whereas some of them did not before.)  But it's just
interesting.....

Thank you very much for your help.  My problem is officially fixed.

Have a Great Day/Evening/Night,
Steven P. Ulrick
-- 
 04:17:42 up 3 days, 10:18,  0 users,  load average: 0.08, 0.08, 0.05


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux