Unicode Question

Mark Smith mark at maseurope.net
Sun Feb 4 10:00:21 EST 2007


Hi, all. I'm finally updating my id3 tag library (it will write as  
well as read), and I want to handle unicode issues correctly.

My question is : when using any library that is going to give you  
back some text as the result of a function, how is it best to  
indicate whether it is unicode or not, so that you can then just "put  
it into fld x" if it's not unicode, or "set the unicodeText of fld x"  
if it is.

Bearing in mind that the text might be anything, might have commas,  
returns or other delimiters, would it be best to return an array:

tText["text"] - the text, tText["encoding"] - iso | utf16 | utf8

or is there a better way?

Any thoughts gratefully recieved.

best,

Mark



More information about the use-livecode mailing list