Working with tab data and utf-8
Devin Asay
devin_asay at byu.edu
Tue Oct 25 12:46:08 EDT 2011
On Oct 25, 2011, at 10:37 AM, 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?
set the itemDelimiter to tab
put item 2 of theData into fld "cif"
> 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"
You have to encode it as unicode:
set the unicodeText of fld "myFld" to uniencode(item 5 of theData,"UTF8")
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list