Tim Selander wrote:

> 1) <?lc set the outputTextEncoding to "utf-8" ?>  --> must be the first line 
> of the .lc
> 2) set the outputTextEncoding to native   -->  must be the first line of the 
> first <?lc  ?> script in the file
> 
> If you put "set the outputTextEncoding to native" later in the script, UTF-8 
> above that line will be garbled; after that line it will show properly.

This can get unnecessarily convoluted if you have to keep alternating between 
"native" and "utf-8" outputTextEncodings between different blocks of LiveCode 
script and HTML.

I can imagine that one would tend to forget to change the outputTextEncoding 
somewhere along the way.

Did you run into any problems with the "put header" method that I had 
suggested, where you only need to insert a single line at the top of the file?

I use the single-line solution and it works perfectly fine on many versions of 
revServer and LiveCode Server, including 3.5, 6.6.2 (the one you’re using), 
6.7.8, 7.1.1, and 8.0.0 DP 12.

This article on HostM.com also mentions the same solution. Perhaps it explains 
it better than I did:

https://www.hostm.com/tutorials/livecode/utf-8-output

Lyn



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to