Working with tab data and utf-8
m.schonewille at economy-x-talk.com
Tue Oct 25 11:47:41 CDT 2011
For plain text, you can use:
set the itemDel to tab
put item 2 of theData into field "cif" of group "controles empresa"
I'm not sure that the UTF8 returned by MySQL is read correctly by LiveCode. If LiveCode reads it correctly, you can do:
set the unicodeText of fld "cif" of grp "controles empresa" to \
uniEncode(item 2 of theData,"UTF8")
but if it isn't then you might need to make sure that MySQL returns plain text, by changing the encoding of your entire database.
Economy-x-Talk Consulting and Software Engineering
Become our partner in sales http://qery.us/16r Start selling Color Converter today. 20% commission!
On 25 okt 2011, at 18:37, Giuseppe wrote:
> Hi all,
> I'm having a little problem I don't understand.
> With this code....
> put "SELECT * from empresas WHERE nif = '" & pID & "'" into theSQL
> put revDataFromQuery(tab, cr, sDatabaseID, theSQL) into theData
> I get this in a variable theData
> 2 123456789 Empresa 2 Empresa 2 DirecciÃ³n 2 Mucia Murcia 30001 EspaÃ±a 868987654 868987654
> now, I need the second value. How can I get it?
> I tried with
> set the text of field "cif" of group "controles empresa" to the second column of theData
> But I get a syntax Error.
> Another problem I have is with ¿utf8?
> In database, the fifth column with "DirecciÃ³n 2" in database is "Dirección 2"
More information about the use-livecode