Page 1 of 1

Convert Cyrillic data

Posted: Mon Mar 24, 2008 1:28 pm
by vijayg
We are working with the Russian data that is converted to Cyrillic charecter, how to convert it back(Russian)? I am not sure how the data was converted to Cyrillic. If we can do it in datastage that is well and good, can this be done in Unix?

Thanks for the help.

Posted: Mon Mar 24, 2008 3:27 pm
by ray.wurlod
You need to find out, obviously, how it was converted to Cyrillic characters in the first place (nothing unexpected should happen in ETL). The short answer is that there are character maps between the outside world and DataStage, that convert from and to the external character set.

There is no mechanism whatsoever in DataStage for converting from English to Russian, unless you implement it yourself.

Posted: Mon Mar 24, 2008 3:46 pm
by Sudhindra_ps
hi,

You could do this in Unix by using iconv function. The syntax for which is as below.
iconv -f <FromSourceCodePage> -t <ToTargetCodePage> <FileNameTobeConverted.txt> > <DestinationFileName>

Thanks & regards
Sudhindra P S

Posted: Mon Mar 24, 2008 4:58 pm
by ray.wurlod
When I did a man iconv on my Linux server it professed ignorance. Does this command come with UNIX or is it something you built yourself?

Posted: Mon Mar 24, 2008 5:34 pm
by Sudhindra_ps
hi Ray,

iconv command comes with UNIX. Please see documentation for the same in the below mentioned link.
http://www.gnu.org/software/libiconv/do ... onv.1.html

Thanks & regards
Sudhindra P S

Posted: Mon Mar 24, 2008 7:14 pm
by ray.wurlod
But not in the man pages. :cry:

Thank you for the link.

Posted: Mon Mar 24, 2008 8:11 pm
by chulett
Interesting. Iconv and man pages both here under HP-UX.

Posted: Tue Mar 25, 2008 2:12 am
by ArndW
man pages for the iconv function are present on AIX as well.

Posted: Tue Mar 25, 2008 2:35 am
by ray.wurlod
Turns out some man pages had been removed, to "save disk space".
:x

Posted: Tue Mar 25, 2008 6:54 am
by chulett
:lol: Brilliant! Who needs them gi-huge-ic man pages, anywho.

Convert Cyrillic data

Posted: Tue Mar 25, 2008 8:05 am
by vijayg
Thanks Guys. Sundhindra's Unix command works great for what we are doing. Appriciate it.