LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Conversion from character set 'UTF-8' to @local error (https://www.linuxquestions.org/questions/slackware-14/conversion-from-character-set-utf-8-to-%40local-error-482583/)

Postgre 09-11-2006 07:07 PM

Conversion from character set 'UTF-8' to @local error
 
I have changed /etc/profile.d/lang.sh to include:
export lang=en_US.UTF-8

Here is my local:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"

and my .bash_profile for GTK+-2.4 Specific include:

G_FILENAME_ENCODING=@local
export G_FILENAME_ENCODING

while I try ro save any html file in firefox, it occurs an error:
Code:

invalid file name
Conversion from character set 'UTF-8' to '@local' is not supported

How could I modify 'G_FILENAME_ENCODING=@local' to fix the error?

According to faq, I may as well 'change the default terminal font to a Unicode one'? how can I do it? thanks.
Quote:

Does Slackware use UTF-8 (Unicode)?

By default, UTF-8 is disabled in Slackware for greater backwards compatibility with programs that do not yet support it.

To enable it, edit /etc/profile.d/lang.sh and add:

export LANG=en_GB.UTF-8

Where en_GB is whatever language you use.

Be aware, you will also probably need to change the default terminal font to a Unicode one, and you're going to have to rename any directories or files that use characters from the ISO 8859-* sets that are not part of the 'core' ASCII characters - e.g. any accented characters. GTK2 and QT based programs should be fine, as well as any that call directly XFT.

Also, the console support for unicode is rather poor at the moment, it's more useful in X. There are also other problems associated with Unicode (evaultions in scripts, etc) that you should be aware of before switching.

man requires you to use an alias to work properly (otherwise it displays very strange characters):

alias man='LC_ALL=C man'

This code can be adapted as need be

liquidtenmilion 09-11-2006 08:00 PM

All I did to make my system UTF8 was add the following line to that file

Code:

export LC_ALL="en_US.utf8"
Written in that exact way, and then removing every other LC* entry, and then my system is entirely unicode, no other changes are necessary.

Postgre 09-11-2006 09:15 PM

Do you mean to just include 2 lines in lang.sh?
Code:

export LANG=en_US.UTF-8
export LC_ALL="en_US.utf8"

what's the content of your lang.sh, could you post it?

I only export LC_CTYPE=en_US.UTF-8, which seems makes all characters well displayed.

and file can't be saved until I comment out:
export G_FILENAME_ENCODING=@local

Here is my lang.sh
Code:

#!/bin/sh

# en_US is the Slackware default locale:
#export LANG=en_US
#export G_FILENAME_ENCODING=@local

#export LANG=C

export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

export LC_COLLATE=C

# End of /etc/profile.d/lang.sh

I'd like to read some on LC_All. Could you provide any guide/links?


All times are GMT -5. The time now is 01:56 PM.