Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Japanese Word processor for linux




On Thu, 27 Nov 2003 12:17:14 +0900
Sam Joseph <gaijin@example.com> wrote:

> Basically the situation is that I have a framework that was written 
> under windows and makes use of some Japanese characters as Strings in 
> java files.  The encoding there is Shift_JIS and that all works fine. 
>
> I am now porting to linux and I would love to be able to run the exact 
> same program, ideally with Shift_JIS characters - checking the code out 
> of Perforce onto my Linux box seems to leave the Shift_JIS characters 
> unreadable.  I was wondering if there was some kind of (ideally free) 
> japanese word processor for linux that would let me create files in 
> different japanese encoding formats like NJStar or JWPce do for windows.

Sam,

In my opinion it is a mistake to put Shift_JIS in java source. By now you
have realized this too I think.
Java uses unicode. Major Java editors save the source in unicode.

I also had the chance to work on a Java project with several people, one
was saving stuff in utf8, the other was saving in sjis (obviously this was
the windows guy), the third was saving it in euc-jp. Wasn't very fun.

So your choices are:
 * Convert all the sources to unicode with native2ascii or your favourite
converter. 
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/native2ascii.html

 * Use one encoding only in addition to utf and utilize the encoding
switch when compiling the bytecode. When compiling your sources on
windows, javac will default to sjis if it's not utf. On unix it will
expect euc-jp. Using the switch will work on both platforms.

About the editor:
Don't listen to people who tell you to edit your source in openoffice.
Openoffice is not a source code editor. Reminds me of people who have to
save every character they type in goddamn Word. (sorry if it wasn't a
source code editor question)
Basically the kitchen-sink can save in any encoding you want. (Hi Josh!)

Hope I made some sense. If not, just save your stuff in utf.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links