Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-12-2004, 04:44 AM   #1
LQ Newbie
Registered: Jun 2004
Posts: 14

Rep: Reputation: 0
how to change the default encoding

in my java project,i use the OS default encoding to transfer the data between server socket and client socket,when i run both server and client side in the chinese version windows,it works well.
but when i deploy the server side to redhat, the chinese charactors can't be display CORRECTLY(the english works well). i guess that is because the server side and the client side use the different encoding. but i don't want to modify my program,i wonder if i can modify the DEFAULT encoding of redhat to chinese (that is GB2312) from the command line because i never install xwindows in my linux.

thank you for any helps!!
Old 07-12-2004, 05:53 AM   #2
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
Try adding this line to /etc/profile:

export LC_CTYPE="your_locale"

Replace your_locale with your locale. Refer to "man locale" for specific locality or type "locale -a" (if i'm not mistaken). But I'm sure it's not just GB2312.

For example for me I use:

export LC_CTYPE="ja_JP"
Old 07-14-2004, 05:16 AM   #3
LQ Newbie
Registered: Jun 2004
Posts: 14

Original Poster
Rep: Reputation: 0
thank you very much,it works !!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Change default character encoding alepou192 Ubuntu 2 05-23-2005 05:56 AM
Cannot change default desktop Wopke Fedora 1 06-23-2004 09:40 AM
Change Default Browser thejoe526 Linux - Newbie 2 06-13-2004 12:01 AM
How to change default wm nacha Debian 1 06-10-2004 09:26 AM
Default Xfree86 font encoding produkc Linux - General 3 09-02-2002 03:53 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 PM.

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