text manipulation with Chinese characters (unicode): guide?

Peter Bogdanoff bogdanoff at me.com
Wed Sep 9 13:58:05 EDT 2020


I’ve been working with simplified Chinese for some time now. You can indeed move and manipulate the characters quite straightforwardly.

I do see some odd line breaks that show mostly in narrow fields.

If you are working with cross-platform (Mac/Windows) text, you won’t necessarily get uniformity between them. Windows text is rendered slightly wider. If you’re working on a Mac and setting some text to a particular font, the same text that is displayed can be bad if you don’t have the font installed on the Windows machine. Font substitution happens, which will look odd. Fonts in Chinese are somewhat of a black hole.

Peter Bogdanoff

> On Sep 9, 2020, at 5:37 AM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> As mentions, Unicode in a field just works (there is a known issue with Thai word breaks and another with printing Hindi)
> 
> If you want to get Chinese (traditional or simplified) into a field, you can:
> 
> 1)  get the text from a Utf8 ot utf16 text file and textDecode it i.e put url ("file:"&filepath) into tContent; put textDecode(tContent,"utf8") into fld "someField"
> 2) get the text from an RTF file, like the above, but set the rtfText of the field to the imported rtf data
> 3) use a 3rd party library, like Wordlib (see the livecode store) to read Microsoft Word .docx or Open Office .odt files
> 
> 
> On 9/8/2020 11:55 PM, Eric A. Engle via use-livecode wrote:
>> Hi!
>> 
>> I would like to be able to copy and paste into fields and scripts Chinese characters, which are of course unicode and then manipulate the resulting strings.
>> 
>> Is this possible in livecode? How? Are there any good Recent guides to working with unicode in livecode?
>> 
>> _______________________________________________
>> 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
> 
> 
> _______________________________________________
> 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