HTML entities not displaying on Chinese Windows

Richmond richmondmathewson at gmail.com
Wed Aug 21 14:00:17 EDT 2013


On 08/20/2013 10:08 PM, Peter Bogdanoff wrote:
> Thanks, Richmond, this makes some sense.
>
> How then, would I encode fields as unicode so they display reliably?

Sorry if I'm being a bit thick, but do you mean in Livecode or in html?

I know that anything that is rendered with Unicode exports 
"transparently" to html just as long as (unlike me) you are not using a 
non-standard unicode font with "funny characters" in one of the private 
use areas: if you are the end-user will only be able to view that html 
if they have the non-standard font loaded on their machine.

---------------------------------------------------

Now, as far as I recall you are working on Windows, for Windows; so:

1. install the open source font editing program FONTforge on your 
machine: http://fontforge.org/ms-install.html

or, if you feel an urge to spend buckets of money, install a commercial 
font prog. such as Fontlab or Fontforge.

2. (And I am presuming you know a few thousand Hanji !!!) open your 
bog-standard Chinese font
with your font program so that you can see the Unicode addresses of each 
character.

2.1. Failing this kidnap/hijack/co-opt/hire a Chinese-American who knows 
his/her stuff.

3. These may display in hexadecimal, so you need some sort of calculator 
to convert those to decimal
values that Livecode will understand.

4. I want to produce the Devanagari (Hindi, Sanskrit) sign for 'Ka' so I 
do this:

set the useUnicode to true
set the unicodeText of fld "crappyText" to numToChar(2325)

5. I want to add 'Ka' to my text:

set the useUnicode to true
set the unicodeText of fld "crappyText" to the unicodeText of fld 
"crappyText" & numToChar(2325)

6. I want to insert a 'Ka' at the insertion point (cursor) in my field:

set the useUnicode to true
set the unicodeText of the selected of fld "crappyText" to numToChar(2325)

Umm . . . possibly this will work rather than the above:

set the useUnicode to true
set the unicodeText of the selected to numToChar(2325)

7. Your mileage may vary :)

8. Exporting to html is 
easy-peasy-non-politically-correct-vaguely-racist-appellation-for-a-far-eastern-person 
:)

9. Do not chase me round the town with a cut-throat razor when this 
turns out to be complete and utter rubbish.

Richmond.

>
> Peter
>
> On Aug 20, 2013, at 3:42 AM, Richmond wrote:
>
>> On 08/20/2013 01:51 AM, Peter Bogdanoff wrote:
>>> Hi all,
>>>
>>> The music history e-book we've been working on for the last couple of years has gotten to the point of having some people in China now translate large parts of it to Chinese. However when they open the compiled version on their Windows machines they see funny characters wherever we use an HTML entity in the HTMLtext of fields. Em dash, double quotation marks, accents, etc., all show this.
>>>
>>> In our classroom use of it, Chinese students at UCLA don't complain about this problem. I don't know much about system settings in Windows, but I see Chinese characters in the system settings for some of the UCLA students whom I have to do other kinds of tech support.
>>>
>>> What could be different about the Windows systems in Shanghai--at least two different people report the same issue?
>> Well the first thing is to reflect on the fact that, rather like the 2 Koreas there are 2 Chinas: The People's Republic of China and the Republic of China (a.k.a. Taiwan), and they have no great love for one another. Now they have both developed their own ways of representing Chinese on computers . . .
>>
>> Mainland China uses the Guobiao encoding system (1,2 or 4 byte).
>>
>> Taiwan, Hong Kong and Macau use Big5 (1 or 2 byte)
>>
>> There is also the Unicode method . . .
>> and here's a groovy phrase I found trawling around on the Merry Internet: "The conversion between traditional and simplified Chinese is usually problematic" . . . Hey Nonny Nonny Nonny Nooooooooooo.
>>
>> Now I don't what version of Windows all these Chinese speaking people might be using, but Windows has
>> a history of multiple encoding strategies that is like a minefield.
>>
>> Sorry to be such a damp squish.
>>
>> Richmond.
>>
>> P.S. You will probably be best going for Unicode encoding as this seems to work (on the whole) on any version
>> of Windows from XP onwards.
>>
>>> These people are grad music students, not computer nerds, so I don't have much to go on. I had them install the Georgia and Helvetica fonts, which are all we use, and probably what they had to begin with.
>>>
>>> I also had to strip out all those characters in the version I finally sent them to translate so they could work. We want to sell the program there eventually--there's a large market there for Western music education, so this worries me.
>>>
>>> Any suggestions?
>>>
>>> Peter Bogdanoff
>>> UCLA
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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