Japanese chars in HTML result [WAS: tips on posting an url and reading the results]
ken at kencorey.com
Sat Feb 4 00:58:52 CST 2012
On 04/02/2012 05:14, Bob Sneidar wrote:
> So the trick is to programmatically determine what is double byte and what is not?
Well, if you take a look at the headers from that page, the
Content-Type: "text/html; charset=UTF-8"
Which is specifies exactly how the data will fall:
For regular ascii characters, nothing changes. For the higher ranges,
you could have 2 to 4 bytes per character.
I've not tried it, but I think your solution is something like this:
put "https://www.googleapis.com/books/ETC" into tURL
get url tURL
set the unicodeText of field X to uniencode(it,"UTF8")
As I understand it, you've got to get the text from UTF8 into the
internal representation of a string. Then, for the field to understand
it and display it properly, you must put the string into the unicodeText
Hope that helps.
More information about the use-livecode