Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Character Sets

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 10-07-2006
PradeepRed PradeepRed is offline
Registered User
 
Join Date: Dec 2005
Last Activity: 17 March 2008, 3:55 AM EDT
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Character Sets

Hi

I was just wondering if there was a way in which i could find out the character set used in a file in HP-UX. ie Whether it is Unicode, UTF-8,ascii etc.

Regards
Sponsored Links
    #2  
Old Unix and Linux 10-10-2006
Andrek Andrek is offline
Registered User
 
Join Date: Aug 2006
Last Activity: 27 April 2010, 9:08 PM EDT
Posts: 122
Thanks: 0
Thanked 0 Times in 0 Posts
Don't know how helpfull this is but the "locale" command will list out your current local env and show what character set is in place.
There is a perl function called perllocale which may help?
Sponsored Links
    #3  
Old Unix and Linux 10-10-2006
Ygor's Unix or Linux Image
Ygor Ygor is offline Forum Advisor  
Advisor
 
Join Date: Oct 2003
Last Activity: 15 May 2015, 11:55 AM EDT
Location: 54.23, -4.53
Posts: 1,801
Thanks: 1
Thanked 112 Times in 98 Posts
Perhaps just use file, e.g...
Code:
$ file file1.txt file2.txt
file1.txt:    ASCII English text
file2.txt:    UTF-8 Unicode text

    #4  
Old Unix and Linux 10-10-2006
PradeepRed PradeepRed is offline
Registered User
 
Join Date: Dec 2005
Last Activity: 17 March 2008, 3:55 AM EDT
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Yup

file command works fine. Linux

Thanks
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FSS and processor sets fugitive Solaris 2 06-11-2009 10:45 AM
How to translate character and font sets ? jack2 Shell Programming and Scripting 2 03-27-2009 11:03 AM
differentiating two sets skyineyes Shell Programming and Scripting 15 12-16-2008 01:13 AM
Clouds (Partially Order Sets) - Streams (Linearly Ordered Sets) - Part 2 Linux Bot Virtualization and Cloud Computing 0 07-28-2007 06:40 AM



All times are GMT -4. The time now is 01:20 PM.