Getting to the Bottom on UTF-8 and UTF-16 on RunRev

Mark Smith mark at maseurope.net
Wed Nov 21 07:44:03 EST 2007


Dave, if I understand right, the server is expecting UTF-16. Unless  
the client app has specifically 'set the unicodeText of fld  
'someField' to someUnicode', the fields will be using the Mac Roman  
charset on Macs, or ISO-8859-1 on Windows and Linux.

Bear in mind that for characters with a value <= 127, UTF-8 =  
ISO-8859-1 = MacRoman = ASCII (I'm pretty sure).

If the server is expecting UTF-16 then you'll have to convert the  
contents of the fields before posting.

See the uniEncode/uniDecode and macToIso/IsoToMac functions.

for example : <put unidecode(uniencode(someText,UTF16),UTF8) into  
someUtf8> will convert 'plain text' to UTF-8

And to add some spice to the dish, if you have any non-intel macs in  
the mix, you may come up against big/little endian issues when  
dealing with UTF-16!

Best,

Mark


On 21 Nov 2007, at 10:34, Dave wrote:

> Hi,
>
> I'm working on a Client/Server application which uses WebServices  
> on the server and a Soap Layer on the Client. All works well in  
> General, but now a problem has come up whereby if we change the  
> stream from UTF-8 to UTF-16, the Server gives an error.
>
> My question is, in RunRev is the character set used UTF-8 to !6? If  
> I send a message built up from data from fields and text strings  
> using the "post" command, would it send UTF8 or 16? If 8, how can I  
> convert UTF-8 to 16?
>
> I'm pretty confused as to how and when UTF-8 or 16 are selected in  
> Rev.
>
> Thanks for your help
> All the Best
> Dave
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list