Application Development 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: 

Code page error when uploading file

Former Member
0 Kudos

Hi Folks,

I am facing an error when trying to upload a file.The file is having some characters like '#' and '%' and code page error is triggering. " At the conversion of a text from code page '4110' to code page '4102' ".

Tried to rectify the error using

" open dataset v_phy_out for output in text mode encoding default

IGNORING CONVERSION ERRORS

replacement character space. "

Still the problem is persisting so please help in this regard.

Gone through SDN but not much helpful in this regard.

Thanks,

Krishna Mukthineni

8 REPLIES 8

Former Member
0 Kudos

hi Folks ,

any Clue please ...

Thanks and regards ,\

Krishna Mukthineni

Former Member
0 Kudos

Hi Try using

OPEN DATASET l_filename FOR INPUT IN LEGACY TEXT MODE CODEPAGE '4102'.

Regds,

Rudra

0 Kudos

Thanks for the reply,

Tried but still not helping out .. ..

I have to solve it by days end ... I am trying hard tooo.

Thanks and Regards,

Krishna Mutkhineni

0 Kudos

Hi,

Did you try the other codepage 4110?

Regds,

Rudra

Former Member
0 Kudos

Code page 4102 is UTF-16, 4110 is UTF-8. I don't think you can open UTF-16 files in text mode, only binary.

Former Member
0 Kudos

Hi . Krishna Mukthineni

In my case, the system was upgraded, non-unicode to unicode.

And I faced the same error message.

If you are in same case, try this.

IN TEXT MODE ENCODING NON-UNICODE

I could solve the problem with that.

Hope it works.

Regards,

Jaeho Lee.

Former Member
0 Kudos

HI

check for the below syntax .........

OPEN DATASET FNAME FOR INPUT IN BINARY MODE.

IN LEGACY BINARY MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp]

. ... IN LEGACY TEXT MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp

OPEN DATASET dsn FOR INPUT IN TEXT MODE ENCODING DEFAULT.

OPEN DATASET dsn FOR OUTPUT IN TEXT MODE ENCODING DEFAULT

Former Member
0 Kudos

Thanks there is some Unicode check problem