Null character in text fields

Richmond Mathewson richmondmathewson at
Wed May 30 03:45:35 EDT 2018

Right . . .

On 30/5/2018 5:14 am, Peter Bogdanoff via use-livecode wrote:
> Hi,
> I have a problem with “funny” characters showing in fields of Chinese text in LC projects on PCs with a Chinese version of Windows (7 & 10) installed. Non-Chinese, standard version of Windows don’t show this. The character displays as a rectangular box. LiveCode 8.3 & 8.9.
> When in a script I do:
> put nativeCharToNum(char 22 of line 66 of field "Contents”)

#1. Why are you using nativeCharToNum instead of codePointToNum ?

Presumably (?) your field "Contents" contains Chinese text.

I am assuming that the codePointToNum of your "0" is 48.

It would help in a big way if you could post "char 22" here.
> it returns “0” (a zero).
> The htmlText of the field seems to show an entity:
When I do this sort of thing:

set the htmlText of fld "htmlF" to numToCodePoint(48)

the field shows a "0"


set the htmlText of fld "htmlF" to the text of fld "textF"

produces exactly the same result.
> On the Web, I see that char 0 is the null character. A search for � returns no results.
> So, I’m going to write a script to replace � with empty in the htmlText. Hopefully this will remove it. Our translator in China will have to test the script to see if it works.

I really wonder what this "&#0" is?
> Has anyone seen this before? Or know how it could have sneaked into the text? The original text was brought in from English Word files of 1990s vintage, and modified and translated since then.
> It is interesting that these LC/Windows renders this character this way only on Chinese Windows systems, and gives it this HTML entity.
> Peter Bogdanoff
> ArtsInteractive

I shall be wandering around the town most of the day doing silly admin. 
guff for my school,

but will try to check back hear about every 60 mins!

Best, Richmond.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list