Quoting Amit Roseberger <[EMAIL PROTECTED]>:

> Hi List.
> I am interested to know what's the default encoding my system use (for
> example when I am saving a file with vi).
> Also, I am running a Java VM on my Linux box... What is the default
> encoding the VM use? is it the same as the system's?

Hey Amit.

What the default encoding is depends on the program and on the environment. If
you're running your program from the shell, it will look at your locale
variables, and mainly on the LC_CTYPE variable. If you run something from the
system cron, it will take the system environment variables.

As for vi, I'm a bit mystified about this myself - I removed UTF8 from every
localization file in my system, and still vi opens up with a default file
encoding of utf8.

Each program has its own behaviour, however. Take vi - it has an encoding, and
then, a file encoding. As it is, I changed the encoding to iso8859-8 in its
vimrc. So when it reads a plain ascii file it assumes a file encoding of utf-8
and does a (useless) conversion. If, however, the file contains Hebrew
characters in ISO8859-8, it interprets it as an unknown encoding, and loads it
up just fine... Each program has such quirks.

As for Java, I can't really help you. I'm not sure it relies on the system
internationalization - I know it doesn't rely on the system timezone. My guess
is that you have to save your preferred encoding in a properties file, load it
within the program and change the encoding using the appropriate class and
method. However, I'm not sure about this.

Herouth

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to