CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 4 - General Support
  How to enable UTF8 support?

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  matthew_exon
      matthew_exon
How to enable UTF8 support?
#1
Newbie
Joined: 2007/3/20
From
Posts: 1
I'm running CentOS as a guest operating system under Xen on a Debian system. I installed it using rpmstrap, and it appears to have arrived with practically nothing installed. I've installed gnome and ssh and a couple of other bits and pieces.

One of the first things I noticed was that it isn't set up to use UTF8 by default. I notice this because I have a file with some UTF8 characters in my subversion repository, and when I check it out subversion chokes when it gets to that file. This always happens when I have the locale set wrong. On Debian, I dpkg-reconfigure locales and I can change the default locale of the entire system to something UTF8-enabled.

So what's the equivalent procedure under CentOS? I discovered the kickstart configuration thing, which seems to allow you to change the language, at least. But I can't see that it actually changes things to UTF8 (it could well use latin1 by default), and anyway it wants to do scary things to my system, like ask me to enter the URL for the repository I want to use, whereas the repositories rpmstrap gave me are working perfectly fine and I don't want to change them).

There's also a change-language thing in the system configuration menu. (Annoyingly, I have to xhost + before it will run, but I figured that out eventually.) But this only has US English installed, and gives no hints as to how I might obtain more languages.

So what do I do? How do I change the language and default character set?

Thanks,
Mat
Posted on: 2007/3/20 18:41
Create PDF from Post Print
Top
  •  nikale
      nikale
Re: How to enable UTF8 support?
#2
Peeking in the Member Window
Joined: 2007/1/8
From
Posts: 11
Hello Mattewh

Just try to use the following command

iconv -cf gb2312 -t UTF-8 $FILENAME > conv_$FILENAME

This will actually converts format from gb2314 to utf-8. I do not know the format in your environment,find it and use it.
if your format is xxxx, u will have iconv -cf xxxx -t UTF-8 $FILENAME > conv_$FILENAME. Notice that the converted file (which is FILENAME) will be output to conv_$FILENAME.

Try it and tell me if it works
Good luck
Posted on: 2007/3/23 3:23
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com