LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-11-2006, 07:07 PM   #1
Postgre
LQ Newbie
 
Registered: Sep 2006
Distribution: slackware 10.2
Posts: 2

Rep: Reputation: 0
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

Last edited by Postgre; 09-11-2006 at 07:34 PM.
 
Old 09-11-2006, 08:00 PM   #2
liquidtenmilion
Member
 
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606

Rep: Reputation: 32
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.
 
Old 09-11-2006, 09:15 PM   #3
Postgre
LQ Newbie
 
Registered: Sep 2006
Distribution: slackware 10.2
Posts: 2

Original Poster
Rep: Reputation: 0
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?

Last edited by Postgre; 09-11-2006 at 09:25 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed with font installation on Debian 3.1 with locale all set to en_US.UTF-8 PhantmShado Linux - Software 1 02-20-2006 03:50 PM
Character conversion combining cat and pipe lda_ga Linux - General 5 08-04-2005 02:45 PM
National character and UTF-8 pingu Linux - Software 3 04-20-2005 01:58 AM
[Enter] in text documents diffrent on Windows and Linux? UTF-8/UTF-16 problem or? brynjarh Linux - General 1 11-24-2004 05:20 AM
X11 / UTF-8 locale seems missing 'fr_FR.UTF-8' chrsitophermann Debian 11 07-17-2004 02:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration