Special Character Issue

Hi Experts,

I am facing an issue. I’m trying to get some data from the SQL database and converting to an XML before sending it to Trading partner.

Here is the issue. The database has a value “Markets-Super” but in the target XML. The ‘-’ symbol is converted to ‘?’. The value appears as “Market?Super”.

I am doing encoding=true when converting documentToXML. Any thoughts on this bug?

Thanks in advance.

Why - is converted to ? it shouldn’t even you set encode=true this works for html encode chars like (&,<,>,') appears in the xmldata.

I tested you should get like this when encode=true
[B]

<?xml version="1.0"?>

Hi this is a "Multiple-Test"[/b]

Is the symbol getting coverted to after documentToXmlString or before?..Is there any replace function being used anywhere in your flow?

The dash in the DB is likely a Windows extended character–Word and other Office apps “helpfully” convert a normal dash into an en or em dash. Depending upon the character set used, those dashes may get translated to a ?. Or it may just be a display issue for whatever utility you’re using the view the XML–it may not be able to display en/em dash so it shows ? instead. But the “real” char is still there.

The first thing I would check is to see what char is in the DB. If it really is an normal dash, then the issue lays elsewhere. If it is an en/em dash, ask if it can be change. It’s likely that it is unintentionally an en/em dash.

yes there may be a hidden/unprintable char behind scenes:)

Hi rmg and reamon,

Thanks for your inputs. I guess its the en/em dash. It is getting converted after the documentToXML.

I’ll check with the DB team.

Thank you.

Hi Rmg and Reamon,

I have checked with DB team and its a normal dash that they are using. I even asked the DB team to populate the dash manually. I am able to receive it properly via JDBC select…but after converting it to XML. It is showing as ?. Not only dash…even the apostrophe symbol is getting converted as ? for this particular field. Not sure whats the issue is. Any thoughts?

But I still believe some thing to do with returned from the result set from JDBC adapter…what is the data type being used in oracle source and JDBC field type in your adapter service selection?

Did you check the more in the pipeline before converting to xmldata?

HTH,
RMG

Hi reamon and rmg,

Sorry for the delayed reply. I found the fix. There is a place where we’re converting the xmldata to a stream and submitting it to TN. So, during the stringtobytes step. I am encoding it to utf-8 and it fixed the issue.