cancel
Showing results for 
Search instead for 
Did you mean: 

Exact Encoding Value for CodePage 858

sridharreddy_kondam
Active Contributor
0 Kudos

Hi All,

Can any one Please provide me encoding value that i need to pass to the receiver file adapter for code page 858.

Currently i am passing cp858, but that is not working.

So please help me... I checked many but could not get exact value.

Regards.

Sridhar

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Check on your PI server, if this codepage is installed.

If not, ask your system administrator to install it.

sridharreddy_kondam
Active Contributor
0 Kudos

Thank You Stefen,

We had waiting for the reply from the Basis team.. will come back to you...

Regards,

Sridhar

sridharreddy_kondam
Active Contributor
0 Kudos

Hi Stefen,

Some of our colleagues are saying that no need to install the codepage at OS level. But i think we should install the codepage in the OS level. Can you please let us know whether we need to ask basis team to install at OS level?

And i found some Java links and as per that the current version(Sun's Java 2 Runtime Environment v. 1.4.2) we are using should have the Codepage Cp858.

http://download.oracle.com/javase/1.4.2/docs/guide/intl/encoding.doc.html

Do we need to do some environment variable setting for this?

Please suggest.

Thanks and Regards,

Sridhar

stefan_grube
Active Contributor
0 Kudos

Hi Sridhar,

I am sorry, I have no clue why this is not working for you.

I have tested only small numbers of different code pages, like cp1252 (Windows latin) which worked for me.

I have not worked with cp858 so far.

What do you mean by: It is not working?

Is the result file not in the correct code page or do you get an error message?

Edited by: Stefan Grube on Jul 11, 2011 12:20 AM

sridharreddy_kondam
Active Contributor
0 Kudos

Hi Stefen,

We tried using adapter modules to convert the codepage and also by passing Cp858 in encoding parameter, but still we are not able to get required values in the receiver file.

But one thing when we pass !u20AC£$ HB from the sender, the out put in the receiver file we are getting is !u20AC£$ HB and also the xml node is being changed to (<?xml version="1.0" encoding="CP858"?>).

As of now the receiver file is being send to PI server location folder only. which is not the one to be converted to Cp858.

Strange is the above bold value (generated in the receiver file) which i had put is converting into the the original value when i have posted the Message in SDN. And this value when i open in the PI server AL11 location it shows with different value. Not sure why this?

Even we raised OSS notes with SAP but still it is not solved, evethough still discussions are going with them.

Not sure what is being missed but still we are looking into that ...

Thanks and Regards,

Sridhar Reddy

Edited by: sridhar reddy kondam on Jul 15, 2011 9:35 AM

stefan_grube
Active Contributor
0 Kudos

The Euro sign is part of cp858, but it is not part of other standard code pages liek iso 8859-1

Are you sending XML data with this header:

(<?xml version="1.0" encoding="CP858"?>)

In that case do not do any conversion, just choose file type binary, which should be used for any XML data.

sridharreddy_kondam
Active Contributor
0 Kudos

Hi Stefan,

Earlier even we tried using xml tag by passing 858 in it. And that didnt work at that time.

Now my Basis Team has informed us that they have installed the codepage 858 in the server.

Then we tested by using the File Encoding as Cp858 in the receiver File adapter for flat file.

But even now it did not work, even after the codepage has been installed.

Can you please let me know, how can we check the codepage that they have installed, do we have any transaction to check it?

I had checked in Table TCP00 --> SAP code page catalog in XI Server, but this doesnt contain the codepage 858, but has diff codepages.

Thanks and Regards,

Sridhar.

stefan_grube
Active Contributor
0 Kudos

Do you pass a plain text file or an XML file?

For a plain text file you apply cp868 as encoding in file adapter, But for an XML file you send the file as binary.

You have to make sure, that the file is correct according to the code page.

So when you add characters for testing, then it may happen, that the characters are not correct.

Check with a hex editor that the charcters have the correct hex value. Compare with a code page chart.

The code page conversion is done in adapter framework or in mapping, which is Java based, so the conversion is done with OS code page, not with SAP code page. So you need not install cp858 in SAP.

stefan_grube
Active Contributor
0 Kudos

I find this reference for standard code pages:

http://download.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html

You see code page 858 is not in the list and has to installed additionally.

It has to be installed on OS level of PI server, not in SAP PI itself.

Answers (2)

Answers (2)

0 Kudos

Hi Sridhar

I hope this sample Java code will help you to resolve the issue. Please change the below code as per your requirment.

try {

OutputStream fout= new FileOutputStream("out.xml");

OutputStream bout= new BufferedOutputStream(fout);

OutputStreamWriter out= new OutputStreamWriter(bout, "IBM00858");

out.write("<?xml version=\"1.0\" ");

out.write("encoding=\"Cp858\"?>\r\n");

out.flush(); // Don't forget to flush!

out.close();

}

catch (UnsupportedEncodingException e) {

System.out.println("This VM does not support the Latin-1 character set."

);

}

catch (IOException e) {

System.out.println(e.getMessage());

}

Regads,

Naga.

former_member472138
Active Contributor
0 Kudos
Please provide me encoding value that i need to pass

What is your input data that is with the junk. I Don't understand clearly. Explain it more.