cancel
Showing results for 
Search instead for 
Did you mean: 

Special Characters in a Java Mapping

Former Member
0 Kudos

Hello everybody,

in our XI we have an Interface Mapping that uses a Java Mapping, this Mapping is doing a XSD-Validation of a XML-File.

In one XML-File there is more than one special Character (ó, O², ü..). The XI-Parser hat no problems with these characters except one, eventhough this character (ó) exists more than once in the document, the parser doesn't recognize it in only one position (While Parsing the "ó" turns to a "��").

I tested the Mapping in Eclipse and it works correctly. The question is, why the special character could not be interpreted in only one position in the document.

I guess it is a bug in the XI-Parser.

I will be thankful for your help.

Best regards

Adnane

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Thanks everybody,

I solved the Problem by implementing a XSL-Mapping bevor the Java Mapping, that converts the incomming XML to UTF-8, I don't know why the Parser doesn't use automatically UTF-8 as Standard but it works now.

regards

Former Member
0 Kudos

Fine!

So please be so kind and mark this thread as solved.

Regards,

Volker

Former Member
0 Kudos

Hello,

The Message that is the Source XML at the Runtime begins with:

<?xml version="1.0"?>

When I test in the Repository with this Message, the Mapping is working correctly and all the special characters are recognised, at the runtime the Mapping doesnt recognise one "ó",

Any Idea?

Best regards

stefan_grube
Active Contributor
0 Kudos

The question is: how comes this message into XI? Which adapter?

When the XML header does not state a codepage, then it has to be assigned in the content-type of the MIME header.

In the SXMB_MONI you should be able to see the content-type of the message.

Under Payload you see "MainDocument" and the content-type in brackets.

Regards

Stefan

stefan_grube
Active Contributor
0 Kudos

When you mention that the ó is wrong just at one position, I wonder what the reason could be. Is this ó in a special environment, other characters around? Have you watched the XML file with a hex editor, are the hex values the same?

Maybe you post an extract of the XML, where this ó is.

Regards

Stefan

Former Member
0 Kudos

This ó has the same Hex-code as all the others and it is in the same environment.

I definned in the source XML in the repository test the code Page in the XML-header as follows :

<?xml version="1.0" encoding="UTF-8"?> and that works. But when I test the Process at the runtime the problem above occurs.

I think that the interface Mapping is getting a source XML without a header, which defines the encoding as UTF-8, because when i test the Mapping in the repository with the XML-file without the Header information, the problem with the ó occurs.

My question is, where can i define the Encoding of the source-XML of this Interface Mapping?

regards

Former Member
0 Kudos

Hello,

I replaced UTF8 through ISO8859-1 in the source XML and now all the "ó"s in the Document could not be interprted ("�"), and thats not really what i want..

best regards

Adnane

Edited by: Adnane Elgoute on Oct 8, 2008 11:11 AM

Former Member
0 Kudos

try with ISO8859-15

Former Member
0 Kudos

Hello,

The same Problem as with ISO8859-1

thanks

Former Member
Former Member
0 Kudos

Hello,

The Document is not really helpful, the conversion of the XML from UTF8 to ISO8859-1 ist not helpful,

I tried it at your advise above.

regards

former_member203631
Participant
0 Kudos

try with ISO-8859-1

Regards,

Shiva

Former Member
0 Kudos

Hello,

please look at the other answers bevor responsing.

regards

former_member203631
Participant
0 Kudos

From your reply I came to know that you used ISO8859-1 so wanted to correct it as ISO-8859-1.

---

Shiva.

Former Member
0 Kudos

ok, I already used ISO-8859-1

regards

Former Member
0 Kudos

Hi,

In your java mapping if you are using <?xml version="1.0" encoding="UTF-8"?> then try with

<?xml version="1.0" encoding="ISO-8859-1"?> if it works for you.

Regards,

Sarvesh

stefan_grube
Active Contributor
0 Kudos

Make sure that your Java mapping works with the same code page as the XML file.

You can read the codepage from the XML header and work with that in your Java program.

Regards

Stefan

Former Member
0 Kudos

Hello,

The Java Mapping ist working with the same code Pages,

best regards

Adnane