Russian character set issue.

Hi All,

I'm facing issue while opening xls file while contains Russian/Siberian character
I tried various options which I could get from google but still issue persists hence thought of taking help here,

We are trying to export data from Oracle via shell script using sqlplus utility. After setting below 2 env variable,

NLS_LANG=RUSSIAN_CIS.CL8ISO8859P5
LC_ALL="en_US.iso88595"

And opening the file via "more" command I could see proper value,

17   

But If I try to view it using "vi", I'm getting below value,

17 \335\336\322\325\334\321\325\340

And after opening the excel file I could see below value,
Excel :

17 ��������   

I wanted the excel sheet to display proper value. Any suggestion please.

Thanks,
Arvind.

What operating system are you using?

LC_ALL="en_US.iso88595" is an unusual locale name. On my system, there are locales named be_BY.ISO8859-5 , ru_RU.ISO8859-5 , sr_YU.ISO8859-5 , and uk_UA.ISO8859-5 ; but none that use 88595 without a hyphen and none that use the ISO 8859-5 codeset for an English language locale.

To get a list of the locales that are available on your system, issue the command:

locale -a

and to limit it to locales using 8859-5, try:

locale -a | grep '8859-*5'

Thanks Don for replying, below are the information,
OS : -

SunOS 5.10 Generic_150400-29 sun4v sparc sun4v

Output of

'locale -a | grep '8859-*'

as below,

de.ISO8859-15
de_AT.ISO8859-15
en_CA.ISO8859-1
en_GB.ISO8859-1
en_IE.ISO8859-1
en_IE.ISO8859-15
en_US.ISO8859-1
en_US.ISO8859-15
en_US.ISO8859-15@euro
es.ISO8859-15
es_MX.ISO8859-1
fr.ISO8859-15
fr_BE.ISO8859-15
fr_CA.ISO8859-1
iso_8859_1
it.ISO8859-15
pt_BR.ISO8859-1
pt_PT.ISO8859-15

OK, and what would be your conclusions from above locale 's output?

8859-5 character encoding is not present in system. Hence I tried setting

LC_ALL=UTF-8

and

NLS_LANG=_.UTF8

and if i open output file generated shows me proper values with

more

command but when I send the file as attachment using

uuencode

command. Excel still shows me weird character. What could be wrong.

Could you install the missing char encoding? Or, would recode or iconv be an option for you?

Hi RudiC,

I tried iconv with various character set but it didn't help. After setting char type as UTF-8. If i check file type its shows

"data"

. Not sure if this information helps. Also I was thinking do I need to perform similar setting while sending mail via

uuencode

command.

recode 

is not present on my system hence unable to check.

Thanks,
Arvind.

Why not ask your system administrator to install the Russian locales on your system. Solaris systems have a wide range of locales available, but a relatively small set is installed by default unless you check the boxes that request more (or all) locales to be loaded when the system is installed.

And, note that ISO 8859-5 and UTF-8 are not the same thing. UTF-8 is a multi-byte codeset used to encode millions of characters from the UniCode codeset. ISO 8859-5 is a single-byte codeset use to encode 256 Latin, Cyrillic, and control characters.

Isn't the problem that there's three different, independent systems involved: ORACLE, *nix, and MS? I think you need to get those systems' charsets in sync to eliminate the errors. How about setting all of them to UTF-8?