Double byte trouble

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Aug 16 15:51:48 EDT 2011


Hi Richmond,

I wrote this yesterday already. The availability of byte and char indicate that RunRev is aware of this problem. Unfortunately, RunRev hasn't actually taken action to solve it yet.

For now, it is just a fact that fields who have the unicodeText property set, need two bytes for a character and will return only the first byte of a character when you retrieve char 1 of that field.

That said, have you tried getting char 1 of the text of fld x? Does that help?

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

What does that error mean? Buy LiveCodeErrors for iPhone now http://qery.us/v4 A must-have for LiveCode programmers.

On 16 aug 2011, at 21:06, Richmond Mathewson wrote:

> I did this:
> 
> set the useUnicode to true
> set the unicodeText of fld "INN" to numToChar(69)
> 
> and, unsurprisingly, an 'E' appeared in fld "INN"
> 
> when I then did this:
> 
> delete char 1 of fld "INN"   'E' vanished; again, unsurprisingly
> 
> when I put a spot of unicodeText in my fld "INN"
> the "delete char 1" script MADE THE FIRST UNICODE CHAR vanish.
> 
> If that is so, why do I have to refer to double-byte unicode chars as "chars 1 - 2" ????





More information about the Use-livecode mailing list