Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Unicode conversion errors

Former Member
0 Likes
516

Hello everyone,

I´m working with a subroutine for testing Unicode in our programs. In UTF-8 there´s no problem. Then I switched the keyboard, language and location in my computer´s settings to czech and try to upload czech texts to UNIX directory like this:

OPEN DATASET fileunix FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE

MESSAGE msg_open REPLACEMENT CHARACTER '?' IGNORING CONVERSION ERRORS.

Some characters are not correctly interpreted and the system triggers an exception if I erase the addition IGNORING CONVERSION ERRORS. If I don´t, then the code looks like this:

+denní p

?

ehled regionálních zpráv z kuchyn

?

iDNES
30 nejaktuáln

?

j?ích sportovních novinek
30 posledních událostí ze sv?ta showbusinessu
detailní mapa Prahy v

?

etn? mo?nosti vyhledávání+

so what´s the idea here ?? how come can the system not read those characters ?? system is MySAP 2005 and unicode-enabled.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
366

Hi Jorge,

As you are saying that system is MySAP 2005 and unicode-enabled, try this

OPEN DATASET fileunix FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

TRANSFER text TO fileunix.

If you open your text file with ENCODING DEFAULT, the text format used for reading or writing data will be platform dependent:

-->In an non-Unicode system, data will be written in non-Unicode format

-->In a Unicode-system, data will be written in Unicode format UTF-8

Hope this will help you.

Thanks,

Shilpa K

1 REPLY 1
Read only

Former Member
0 Likes
367

Hi Jorge,

As you are saying that system is MySAP 2005 and unicode-enabled, try this

OPEN DATASET fileunix FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

TRANSFER text TO fileunix.

If you open your text file with ENCODING DEFAULT, the text format used for reading or writing data will be platform dependent:

-->In an non-Unicode system, data will be written in non-Unicode format

-->In a Unicode-system, data will be written in Unicode format UTF-8

Hope this will help you.

Thanks,

Shilpa K