File conversion from Unix to ANSI


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers File conversion from Unix to ANSI
# 1  
Old 02-05-2008
Question File conversion from Unix to ANSI

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 tried using the echo $LANG command to find the default encoding. It says parameter not set. Even the locale doesnt show any value set for language.

I am using HP-Unix.
# 2  
Old 02-05-2008
HPUX?

So type locale

It will show you what is set...
# 3  
Old 02-05-2008
Forgot...
Do a man of:
locale(1), localedef(1M), setlocale(3C), environ(5).
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File conversion from Binary to ASCII though UNIX command

Hi All , I have a mainframe file which contains the data in EBCDIC format.I have downloaded this file from mainframe to windows in binary format(unreadable raw data).Now I want convert this file to ASCII format(readable format data) through Unix command.I have tried iconv but that is not working... (2 Replies)
Discussion started by: STCET22
2 Replies

2. Ubuntu

Query related to conversion of segy file and .su files using Seismic Unix

hi M using ubuntu 11.04....and has installed Seismic Unix on it.... I want to process some unprocessed segy data using Seismic Unix.... i have converted .segy file to .su using segyread tape=file1.seg verbose=1 endian=0 | segyclean > smallfile.su and got 3 files -smallfile.su... (0 Replies)
Discussion started by: Ankita Singla
0 Replies

3. Programming

why the implementatoin of Bakery algorithm in ANSI C does not work in ANSI C

I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry? Only print out: Thread ID: 0 START! Thread ID: 0 END! Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies

4. Shell Programming and Scripting

Linux to ansi pc conversion

Hi All, I checked the old posts here. But could not find a solution for my question. I have a file created by one application in HP-UX. My client wants it to be converted into ANSI PC version. I have heard about unixtodos and have worked with it also. But I am totally unaware of of this ANSI... (0 Replies)
Discussion started by: Tuxidow
0 Replies

5. UNIX for Dummies Questions & Answers

ANSI C, char to hex conversion

Hi, I have a char buf,ch; and the buf is filled with the result from MySQL server which I get like this numbytes = recv(sock, buf, 1024, 0));I have the followingcode to display the results printf("received %ld bytes:\n",numbytes); for(c=0;c<numbytes;c++){ ch = (char)buf; ... (2 Replies)
Discussion started by: alikims
2 Replies

6. Shell Programming and Scripting

Convert file from Unix - ANSI to PC - ANSI

Hi, I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this? Thanks, Sunil (0 Replies)
Discussion started by: ssmallya
0 Replies

7. Shell Programming and Scripting

Dos to Unix conversion

Hi ! I need to convert a DOS batch file to Unix Shell script. Can anybody help me by providing equivalent Unix shell script code to this DOS batch code?. for /F "tokens=2,3,4 delims=/- " %%i in ("%date%") do set DateStamp=%%k%%i%%j Any help would be great. Thanks, John. (1 Reply)
Discussion started by: john413
1 Replies

8. UNIX for Dummies Questions & Answers

ANSI C compiler on UNIX

Hi, I run into an error message like this (Bundled]) cc: "flat.c", line 350: error 1705: Function prototypes are an ANSI feature.' Also when trying to compile with -Aa or -Ae options I get (Bundled) cc:warning 480: The -A option is available only with the C/ANSI C product; ignored. Is that... (1 Reply)
Discussion started by: elenav
1 Replies

9. UNIX for Dummies Questions & Answers

Unix to EBCDIC conversion

Hi, I am using HPUX 11. There is a command to convert Unix formatted data to Dos formatted data called 'ux2dos'. Is there a similar command to convert Unix formatted data to EBCDIC format? Many thanks Helen :) (2 Replies)
Discussion started by: Bab00shka
2 Replies

10. UNIX for Advanced & Expert Users

Time conversion in Unix

Hi, Is there any way to get current time for a particular country using any unix command ? I mean, If i want to find out current time in US or UK or anything .... Any command or library routine available for that? How it can be done in C on Unix? Can anybody help me? Thanks --... (1 Reply)
Discussion started by: kamlakar
1 Replies
Login or Register to Ask a Question