LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

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

Rep: Reputation: 0
how to change the default encoding


hello
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, 04:53 AM   #2
chii-chan
Member
 
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, 04:16 AM   #3
zhebincong
LQ Newbie
 
Registered: Jun 2004
Posts: 14

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


Reply


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


All times are GMT -5. The time now is 11:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration