Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Builder UTF-8 support

Status
Not open for further replies.

romandy

Programmer
Jul 18, 2012
5
Hello, community!

I'm trying to implement integration with one web-service using SOAP. There are some text fields that contain UTF-8 characters in SOAP. So, solution is very simple, we just create XML using OScript built-in functions, then create socket connection to web-service and so on - exchange is done. Problem is when writing unicode characters - they are not supported. Is there any solutions?

I tried the experiment to determine this:

1. create user and write it initials with unicode
2. get userinfo using UAPI
3. generate XML and write down user initials into this XML
4. turn on any network analyzer and capture that XML

I searched information about UTF-8 support in KC, but it was not successful :(
 
I've found solution :)

I should prepend byte order mark in XML. The UTF-8 representation of the BOM is the byte sequence 0xEF,0xBB,0xBF.
So when opening socket I prepend "Str.ASCII(239) + Str.ASCII(187) + Str.ASCII(191)".

Now it works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top