Unable to handle Cyrillic(russian) characters


My requirement is to send a flat file to a bank which contains the payment details. I am getting the data using the JDBC adapter and i am able to get the russian characters succesfully. The problem is when i am doing writeToFile. So when i do writeToFile the file display’s “???” inplace of russian characters. before write to file i am doing convertToString.
I have tried with different encodings like Cp1251,UTF16. But no luck.
Could you please help me on this issue.

I have never tried to do exactly what you are doing, but could it be a problem with your text reader? Perhaps the file is being written correctly, but when you open it your text reader can’t decipher the russian text.

(Not sure i can help at all)!!!

HI Greg,

First of all thanks for the reply.
Yes, i will agree with you regarding text editors. But we have opened the file UNIX server also. It’s showing “???” instead of cyrillic characters.
Is that possible on UNIX also…

I would think that it would be possible on Unix, unless your Unix box was configured to handle russian characters.

Hmmm, i was thinking about this more - you might also try re-posting this somewhere in the adapter section - it might be noticed more by people who have seen this type of translation before.

Also, in the past when i have dealt with odd character sets, i have gotten a known good example so that i could compare against it. In other words, if you have an example of the correct file format, put that on your Unix box and see how it looks. If your file looks similar, it may be alright!


In case of UNIX handlig Russian language in ASCII mode you may have a problem related to your login account or actual login session. You can change your UNIX session language to display encoded characters properly. Your file may be written ok but your telnet or terminal session may garble Russian or other language characters if its set to EN. you may want to set environment language = to specific langiage or code page to see if actual data is ok.

If this does not help and you find that file you writen from IS is still garbled by Java output stream then you may need to set language preference and encoding on IS JVM or at your Java method call


Can you please try with the following russian encoding type.



Hi ,

Thanks for all your care…

we have resolved the issue. We just did 2 steps.

  1. string to byes
  2. BytesToFile(To write into the file).

And it worked well…
Now there is another problem. A service should pick this file and converts to MIME and SMTP the file. Here we got the problem. When they recieve this file , they were unable to see the data in the file.
I think there is a problem in preparing the MIME content.
Could you shed some light…