Try using the iconv program. That is the way I ever translate character sets. For example if I have utf-16 and I want ascii it is just:
Code:
iconv -f utf-16 -t ascii < input.file
Read the man page on it but then do a iconv -l to get of list of character sets that your iconv knows. Also use our search tool to look for threads containing "iconv". You are not the first person with this problem and you will probably find a few dozen threads.
Need Help?? We receive Files From GM Motors and they written on a Sun Workstation using the Tar Command on a 4mm Dat Tape. We have an HP sure Store 24 Tape drive that will Execpt but when i do that it says that the media is bad. was wondering if there was any software that would read it in its... (2 Replies)
I loaded OS X Panther on my Mac G4 and found that many files previously saved as Word or Word Perfect files were inadventently converted to Unix executable files. When I try to read these in Word, it cannot recognize or translate the file properly. Does anyone know how to translate these files? Is... (4 Replies)
I am trying to FTP a text file from a machine running LynxOS and I am having problems with the way windows "sees" the characters. For example this is how windows presents the text:
DevProcRcpClass
The boxes are what I am having problems with. When viewing the same file on a... (3 Replies)
Is there a tool available to convert UNIX (BASH Shell) scripts to DOS scripts?
I understand that DOS scripting is far inferior to unix scripting, and therfore this conversion may not be possible.
Alternativley, perhaps I could convert my Unix scripts to C... then compile it for a windows... (2 Replies)
Hello folks
I am working on a project that requires me to write a script that operates on a bunch of text files. When I try less file.txt I see a bunch of ^M's everywhere. Some Googling tells me that this is because the files have a DOS fileformat and found the following fixes:
sed 's/^M$//'... (5 Replies)
Hi
i try to change the date-format from DD/MM/YYYY into MM/DD/YY.
Input-Data:
...
31/12/2013,23:40,198.00,6.20,2,2,2,1,11580.0,222
31/12/2013,23:50,209.00,7.30,2,2,3,0,4380.0
01/01/2014,00:00,205.90,8.30,2,2,3,1,9360.0,223
...
Output-Data should be:
...... (7 Replies)
How to convert this:
F1-R1 F1-R2 F1-R3 into a flat file for bash?? Each record
F2-R1 F2-R2 F2-R3
F3-R1 F3-R2 F3-R3
F4-R1 F4-R2 F4-R3is on one line with all fields for that record, put into an output file. The output file should look like this when converted:
F1-R1,F2-R1,F3-R1,F4-R1... (6 Replies)
I uploaded a .dat file from sftp to my server and after using dos2unix to convert the file and check my work it says that the file was not transferred correctly and that the content is garbled. Please help (3 Replies)
Discussion started by: Ovid158
3 Replies
LEARN ABOUT FREEBSD
__iconv_free_list
__ICONV_GET_LIST(3) BSD Library Functions Manual __ICONV_GET_LIST(3)NAME
__iconv_get_list __iconv_free_list -- retrieving a list of character encodings supported by iconv(3)LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <iconv.h>
int
__iconv_get_list(char ***names, size_t count, bool paired);
void
__iconv_free_list(char **names, size_t count);
DESCRIPTION
The __iconv_get_list() function obtains a list of character encodings that are supported by the iconv(3) call. The list of the encoding
names will be stored in names and the number of the entries is stored in count. If the paired variable is true, the list will be arranged
into canonical/alias name pairs.
The __iconv_free_list() function is to free the allocated memory during the call of __iconv_get_list().
RETURN VALUES
Upon successful completion __iconv_get_list() returns 0 and set the names and count arguments. Otherwise, -1 is returned and errno is set to
indicate the error.
SEE ALSO iconv(3), iconvlist(3)STANDARDS
The __iconv_get_list and __iconv_free_list functions are non-standard interfaces, which appeared in the implementation of the Citrus Project.
The iconv implementation of the Citrus Project was adopted in FreeBSD 9.0.
AUTHORS
This manual page was written by Gabor Kovesdan <gabor@FreeBSD.org>.
BSD October 20, 2009 BSD