LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 01-14-2007, 09:57 PM   #1
yuubouna
LQ Newbie
 
Registered: Jan 2007
Posts: 10

Rep: Reputation: 1
Lightbulb 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
 
Old 01-14-2007, 10:34 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You might get more information using the --mime option.
 
Old 01-14-2007, 10:51 PM   #3
yuubouna
LQ Newbie
 
Registered: Jan 2007
Posts: 10

Original Poster
Rep: Reputation: 1
thanks jschiwa!
file --mime {fileName}

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

why charset=unknown?
 
Old 01-16-2007, 01:47 AM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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.
 
  


Reply

Tags
encoding, file


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert file from UTF8 to ASCII encoding graemef Programming 8 12-15-2008 04:45 AM
converting file encoding (batch files) with same output filename yuubouna Linux - Newbie 1 01-14-2007 08:32 PM
LXer: CLI Magic: Convert file names to a different encoding with convmv LXer Syndicated Linux News 0 12-11-2006 03:54 PM
determine encoding type of a file (ie - UTF-8) chovy Linux - Software 1 04-03-2006 12:46 AM
encoding for ReiserFS file names? uselpa Slackware 1 11-15-2005 04:09 PM


All times are GMT -5. The time now is 05:33 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