Unicode woes

Richmond Mathewson richmondmathewson at gmail.com
Mon Aug 15 12:12:31 EDT 2011


On 08/13/2011 05:04 PM, Mark Schonewille wrote:
> Hi Richmond,
>
> It doesn't work because the first char actually gets the first byte and thus you only get the first half of the first character.
>
> This might work, depending on the textFont setting and maybe writing direction:
>
> on mouseUp
> 	set the unicodetext of fld "xxx" to char 1 to 2 of the unicodetext of fld "zzz"
> end mouseUp

That works very well indeed.

HOWEVER . . . my textField contains mixed Unicode and ASCII text [spaces,
Latin letters] . . . so I am obviously going to have a jolly time 
detecting whether each char falls below the 255 ASCII limit and then, if 
it does, treating it as an ASCII char, and if it doesn't lining it up 
with the next char to give a double-byte char.
> --
> Best regards,
>
> Mark Schonewille
>
>
>
> On 13 aug 2011, at 15:43, Richmond Mathewson wrote:
>
>> Anybody know why this doesn't work:
>>
>> on mouseUp
>> set the useUnicode to true
>> set the unicodeText of fld "XXXX" to the first char of the unicodeText of fld "ZZZZ"
>> end mouseUp
>>
>> ???
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list