The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
URL encoding Vichu Shell Programming and Scripting 8 08-27-2008 08:16 PM
Encoding Problem while using "|" (PIPE) as delimiter from Mainframe to Unix seshendra UNIX for Dummies Questions & Answers 1 02-20-2008 05:36 AM
character encoding in Fedora6 bsky UNIX for Dummies Questions & Answers 1 01-04-2008 09:29 AM
encoding palmer18 UNIX for Dummies Questions & Answers 3 08-21-2007 10:35 AM
no SOAP encoding under unix? devotedsinner SUN Solaris 0 11-07-2005 07:28 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-04-2008
ssmallya ssmallya is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 10
Red face File encoding in Unix

1. I have a shell script which creates a file using cat command. How can i find what encoding the file follows (e.g. UTF8, ANSI)?

2. I want to convert that file to PC-ANSI format. How can i achieve that?

I am using HP-Unix.
  #2 (permalink)  
Old 02-04-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,960
Actually file encoding should not be guessed or detected,
its better that is clarified from the originating source.

Since you have the control to create the file, it depends on the character set being used to create the file whether its ANSI / UTF-8/ LATIN-1/ SJIS

encoding conversion tests can be done using iconv command
  #3 (permalink)  
Old 02-04-2008
ssmallya ssmallya is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 10
Question File encoding in Unix

How do i set the character encoding/get it clarified in a Unix script? Is there any command?
  #4 (permalink)  
Old 02-04-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,960
check it from


Code:
echo $LANG

  #5 (permalink)  
Old 02-04-2008
ssmallya ssmallya is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 10
Question Unix encoding

echo $LANG doesnt work on my machine... Parameter not set!
Can anyone please tell me how to convert my files to Windows ANSI encoding in HP Unix? It would be great if you could give me the alias..
  #6 (permalink)  
Old 02-04-2008
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,941
Try the locale utility. It will display your current locale settings.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0