initial setup for iconv


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting initial setup for iconv
# 1  
Old 06-09-2011
Java initial setup for iconv

hi

I am trying iconv on my linux machine for conversion of RUSSIAN to ENGLISH, but i am not able to get exact result.

i want to know what initial setting in linux machine we need to do to get desired output

I created sample russian file using google translate in CP866 endcoding
and full command is

Code:
iconv -f CP866 -t UTF-8 test.txt

and output is same as input i.e.

Code:
АБВГДЕЖЗИЙК

please suggest steps to do proper conversion.

Piyush
# 2  
Old 06-09-2011
you want to 'translate' your text in another language or 'convert' into another encoding?
# 3  
Old 06-09-2011
Quote:
Originally Posted by sk1418
you want to 'translate' your text in another language or 'convert' into another encoding?
i want to 'translate' text i.e.

Code:
АБВГДЕЖЗИЙК...

to
Code:
abcdefghi...

---------- Post updated at 09:25 PM ---------- Previous update was at 09:07 PM ----------

can anyone help me on this
# 4  
Old 06-09-2011
Code:
kent$  echo "АБВГДЕЖЗИЙДЕЖЗИК"|sed 'y/АБВГДЕЖЗИЙК/abcdefghijk/'
abcdefghijefghik

# 5  
Old 06-09-2011
Quote:
Originally Posted by sk1418
Code:
kent$  echo "АБВГДЕЖЗИЙДЕЖЗИК"|sed 'y/АБВГДЕЖЗИЙК/abcdefghijk/'
abcdefghijefghik


Hey this can be options but it was just sample.

In real situation i will have 20-23 diffrent source file in diffrent character set encoding and i need to convert all of them to UTF-8.

All i want to know does iconv need some initial setup like language support etc or somthing else.
# 6  
Old 06-10-2011
iconv changes the encoding, but not the content.
in your case, you could apply sed 'y/[allYourRussianLetters]/abcd...z/' command on all your 20-23 source files. to do the "translation"
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Iconv on large files

Hi All, I am using iconv to convert huge files. the process is getting killed. I tried the option in below link https://www.unix.com/shell-programming-and-scripting/258825-iconv-large-files.html i.e iconv -f UCS-2 -t UTF-8 < inputfile.txt > outputfile.txt However, the process still gets... (4 Replies)
Discussion started by: tostay2003
4 Replies

2. IP Networking

DNS question about initial Master/Slave setup

Hey everyone. I'm creating a DNS master/slave server set up. I have the configurations all done I believe, the master has the required zone file, and the named.conf file has the allow transfer and allow query stuff set. The slave has it's own configs set. My question is that when initially... (1 Reply)
Discussion started by: Lost in Cyberia
1 Replies

3. Shell Programming and Scripting

Help with command iconv

I need to convert a utf16 file to utf8. When i use the iconv command to do so it gives an error saying invalid function. When I ran the iconv -l function it did not list the utf16 and utf8 as part of its internal table. Is there anyway I can add these encodings in the library? Is there any other... (3 Replies)
Discussion started by: gaun
3 Replies

4. AIX

GPFS initial setup, but perhaps this is a SAN/VIO question

I'm having some trouble getting a POC of GPFS up and running. I've read a couple install guides including a couple IBM pdfs but I'm getting stumped on something I think is fairly fundamental.... I'm trying to do this all on a single 795, right now only the VIOs have HBAs so all LUNs are pointed to... (3 Replies)
Discussion started by: kneemoe
3 Replies

5. UNIX for Dummies Questions & Answers

Help with iconv command

Hi , I am using iconv command to convert a file in UTF-16 format to UTF-8 format. This command will work for few files but for some showing an error as bad input character. But if i copy the contents of the file for which it is showing "bad input character" to a new file and perform the... (2 Replies)
Discussion started by: Shruthi8818
2 Replies

6. Shell Programming and Scripting

Help with iconv command

Hi , I am using iconv command to convert a file in UTF-16 format to UTF-8 format. This command will work for few files but for some showing an error as bad input character. But if i copy the contents of the file for which it is showing "bad input character" to a new file and perform the... (0 Replies)
Discussion started by: Shruthi8818
0 Replies

7. AIX

AIX virtualization: IVM initial network setup

I have a system model 505 p server. I am trying to virtualize my server. My network admin has given me 10 IP addresses (with the DNS already updated with names that map onto each ip). E.g.: IP1 maps to m1.lab, IP2 maps to m2.lab, etc I have been following the redpaper "Integrated Virtualization... (0 Replies)
Discussion started by: apsaix
0 Replies

8. UNIX for Advanced & Expert Users

iconv and xmllint

Here is my question, volume of records processed : 5M ( approx ) Its basically very simple operation that am trying to do and I had achieved the output that am interested. What am looking for really is to improve the performance, an optimized way to do that. with respect to iconv, am... (3 Replies)
Discussion started by: matrixmadhan
3 Replies

9. Programming

about iconv

I want to use iconv.h to convert some text to another charset. The code is below: #include <stdio.h> #include <stdlib.h> #include <iconv.h> int main() { iconv_t cd; char instr="汉字"; char *inbuf; char *outbuf; unsigned int insize=7; ... (4 Replies)
Discussion started by: yong
4 Replies
Login or Register to Ask a Question