Ho,
I'm using the Char2UTF8() to add data to an XML. I need this for French characters as é è à and so on.
Now this seems to be wrong interpreted by Microsoft Edge when you open the XML.
Anyone who is using french characters in an XML? Or special characters as are used in German, Spanish, Romanian, ... Which conversion are you using?
Thanks for any help.
Char2UTF8() in XML
Re: Char2UTF8() in XML
HI Chris,
It depends on what the purpose of the XML is.
I use Windows -1252 to generate the XML for the tax authority and it works well with Portuguese characters.
It depends on what the purpose of the XML is.
I use Windows -1252 to generate the XML for the tax authority and it works well with Portuguese characters.
Pedro Alexandre
Re: Char2UTF8() in XML
Hi Pedro,
Thanks for the suggestion but it seems as it isn't working.
I changed the encoding and I removed the char2utf8. Now I can open the XML with Edge without a problem, but the signs as é à è aren't correctly shown.
I'm using Chilkat to create the XML. I don't know if that could be the cause of my problem.
Thanks for the suggestion but it seems as it isn't working.
I changed the encoding and I removed the char2utf8. Now I can open the XML with Edge without a problem, but the signs as é à è aren't correctly shown.
I'm using Chilkat to create the XML. I don't know if that could be the cause of my problem.
Re: Char2UTF8() in XML
Make sure you are compiling exe into ANSI mode, not OEM.
As I am rather inclined into doubt of utf capability of xpp own functions, can you use ot4xb conversion function to do conversion?
But yes, provide xml in zipped format , please so we can see inside.
As I am rather inclined into doubt of utf capability of xpp own functions, can you use ot4xb conversion function to do conversion?
But yes, provide xml in zipped format , please so we can see inside.
skiman wrote: ↑Fri Jan 12, 2024 3:27 am Ho,
I'm using the Char2UTF8() to add data to an XML. I need this for French characters as é è à and so on.
Now this seems to be wrong interpreted by Microsoft Edge when you open the XML.
Anyone who is using french characters in an XML? Or special characters as are used in German, Spanish, Romanian, ... Which conversion are you using?
Thanks for any help.
Re: Char2UTF8() in XML
Hi,
In attachment a sample.
In de tag <deliveryaddress><street> I placed the following in my Xbase app:
In my source code I have:
The function ConvCpToUtf is as follows:
The result is the same when using the Xbase conversion function of the OT4XB function.
In attachment the XML file.
In attachment a sample.
In de tag <deliveryaddress><street> I placed the following in my Xbase app:
.street é à test
In my source code I have:
Code: Select all
...
oXml:newchild2("orderHeader|deliveryAddress|street",ConvCpToUtf(alltrim(cAdres)))
...
Code: Select all
function ConvCpToUtf(cText)
***************************
if !empty(cText)
return cOemToUtf8(cText)
endif
return ""
In attachment the XML file.
- Attachments
-
- sample.zip
- (646 Bytes) Downloaded 576 times