LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   file encoding (https://www.linuxquestions.org/questions/linux-general-1/file-encoding-519345/)

yuubouna 01-14-2007 09:57 PM

file encoding
 
I want to know what is the encoding of my file like UTF-8,Shift_JIS etc..,
for e.g *.java files

i tried,
file {filename}
but executing file command just result like the foll,
{file name}: Perl5 module source text

can anybody help?
Thanks :-)

yuubouna

jschiwal 01-14-2007 10:34 PM

You might get more information using the --mime option.

yuubouna 01-14-2007 10:51 PM

thanks jschiwa!
file --mime {fileName}

e.g for java files:
DateUtils.java: text/x-java; charset=unknown

why charset=unknown?

jschiwal 01-16-2007 01:47 AM

There used to be separate i18n packages that you can install, but I think that now everything is rolled into the one. There are also modules that you can load into the kernel such as nls_koi8_r. I don't know what support that supplies however.


All times are GMT -5. The time now is 10:17 AM.