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

Open Data Set Encoding

Former Member
0 Likes
2,340

Hello all,

Can we specify Encoding in the OPEN DATA SET statement,i found out that we can encode it with UTF-8.

but i want to encode my data in Latin1 ISO-8859-1.

is it possible?

if yes how to do it?

plz help its urgent:(

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,375

Hello Surmeet

You cannot define an encoding for a specific ISO encoding.

However, if your file is not correctly read using encoding UTF-8 (e.g. the German Umlaute like ä, ö, ü are not displayed properly) you could try encoding NON-UNICODE.

Recently I have had exactly this problem at a customer site where

OPEN DATASET ... ENCODING DEFAULT    " on ECC 6.0 unicode -> UTF-8

did not work properly yet using

OPEN DATASET ... ENCODING NON-UNICODE

everything was fine.

Regards

Uwe

6 REPLIES 6
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,376

Hello Surmeet

You cannot define an encoding for a specific ISO encoding.

However, if your file is not correctly read using encoding UTF-8 (e.g. the German Umlaute like ä, ö, ü are not displayed properly) you could try encoding NON-UNICODE.

Recently I have had exactly this problem at a customer site where

OPEN DATASET ... ENCODING DEFAULT    " on ECC 6.0 unicode -> UTF-8

did not work properly yet using

OPEN DATASET ... ENCODING NON-UNICODE

everything was fine.

Regards

Uwe

Read only

0 Likes
1,375

hello uwe,

yes even i m facing this problem with the german characters

will try ur solution

thanx

Read only

0 Likes
1,375

hi UWE,

the thing u told for the non unicode is working fine

but it is giving me a dump for one string

the string is:

020#H04#DMT (ADSL, ADSL2)#Alternativ ist der Einsatz von ADSL2plus(H13) nicht zugelassen. Die Beauftragung einer Nutzungsänderung „Änderung des Übertragungsverfahrens“ ist zwingend erforderlich.

the dump i m getting is: A character set conversion is not possible.

can u tell me the reason for this and how to correct it

htnax plz its urgent

Read only

0 Likes
1,375

Hello Surmeet

For me this sounds like that your string contains characters from two different encodings, e.g. ISO-8859-1 and ISO-8859-2.

You could try to use option

OPEN DATASET ... IGNORING CONVERSION ERRORS.

Alternatively, you could surround the OPEN DATASET statement with a

TRY.
  OPEN DATASET ...

CATCH CX_SY_CONVERSION_CODEPAGE INTO lo_error.
  ld_msg = lo_error->get_text( ).  " get the message text
ENDTRY.

block and analyse the error message text. Hopefully you will find some hints to solve the problem.

<i>Note</i>: For details refer to the ABAP keyword documentation of OPEN DATASET.

Regards

Uwe

Read only

0 Likes
1,375

hello uwe,

i still have a problem

the problem is that all my special corrector Ä and all special german characters are getting converted in to '#'

how to solve this?

i m sorry for troubling u again and again

Read only

0 Likes
1,375

hi

i am facing the same problem

could you please help me out how you have resolve it.

thanks in advance and <<removed_by_moderator>>.

Edited by: Vijay Babu Dudla on Jun 30, 2009 1:28 AM