Read data in datagrid with æøå
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Read data in datagrid with æøå
Hello everybody.
I have a datagrid as you see here: When I try to readout the data it will look like this instead:
Sren Laursen
Kbenhavn
Klaus Kj
How can I readout the right letters?
Best regards Tue.
I have a datagrid as you see here: When I try to readout the data it will look like this instead:
Sren Laursen
Kbenhavn
Klaus Kj
How can I readout the right letters?
Best regards Tue.
Re: Read data in datagrid with æøå
Dag Tue,
hm, just made a test with LC 8.1.2 on a german macOS 10.12.2 and it works as exspected!?
See attached screenshot.
What script are you using to read out the data?
Best
Klaus
hm, just made a test with LC 8.1.2 on a german macOS 10.12.2 and it works as exspected!?
See attached screenshot.
What script are you using to read out the data?
Best
Klaus
Re: Read data in datagrid with æøå
Hello Klaus.
I've now testet it as you did.
Internally it works without any problems.
I'm writing a client for CasparCG and when I send the data to the CasparCG the problem appears.
Brg Tue.
I've now testet it as you did.
Internally it works without any problems.
I'm writing a client for CasparCG and when I send the data to the CasparCG the problem appears.
Brg Tue.
Re: Read data in datagrid with æøå
Dag Tue,
ah, so it looks like this is an textencoding problem!
What encoding is the "CasparCG" exspecting?
Also check the "textEncode" command in the dictionary!
Best
Klaus
ah, so it looks like this is an textencoding problem!
What encoding is the "CasparCG" exspecting?
Also check the "textEncode" command in the dictionary!
Best
Klaus
Re: Read data in datagrid with æøå
Probably it has something to do with the encoding of the text.
When I use text stored in fields to send to CasparCG I do like this:
and then I send cgF0, cgF1 and cgF2 to CasparCG without problems.
When I use data stored in a datagrid I do like this:
and then I send tf0Line, tf1Line and tf2Line to CasparCG and then there is problems.
But how do I convert the text then?
When I use text stored in fields to send to CasparCG I do like this:
Code: Select all
put the unicodeText of field "Navn" into cgNavnUni
put the unicodeText of field "Kreds" into cgKredsUni
put the unicodeText of field "Navn_2" into cgNavn_2Uni
put uniDecode (cgNavnUni, "UTF8") into cgNavnUtf8
put uniDecode (cgKredsUni, "UTF8") into cgKredsUtf8
put uniDecode (cgNavn_2Uni, "UTF8") into cgNavn_2Utf8
put cgNavnUtf8 into cgF0
put cgKredsUtf8 into cgF1
put cgNavn_2Utf8 into cgF2
When I use data stored in a datagrid I do like this:
Code: Select all
put the dgHilitedLines of group "seqGrid" into theLine
put the dgDataOfLine[theLine] of group "seqGrid" into theDataA
put theDataA["f0"] into tf0Line
put theDataA["f1"] into tf1Line
put theDataA["f2"] into tf2Line
But how do I convert the text then?
Re: Read data in datagrid with æøå
Hi Tue,
please note that most of the "unicode..." handlers, functions and properties are deprecated since version 7 in Livecode!
That means e.g. "unicodetext", "uniencode" and "unidecode"!
Use the "textencode/textdecode" functions instead.
Try this:
...
put the dgHilitedLines of group "seqGrid" into theLine
put the dgDataOfLine[theLine] of group "seqGrid" into theDataA
put textencode(theDataA["f0"],"UTF-8") into tf0Line
put textencode(theDataA["f1"],"UTF-8") into tf1Line
put textencode(theDataA["f2"],"UTF-8") into tf2Line
...
before sending the data to CasparCG.
Best
Klaus
please note that most of the "unicode..." handlers, functions and properties are deprecated since version 7 in Livecode!
That means e.g. "unicodetext", "uniencode" and "unidecode"!
Use the "textencode/textdecode" functions instead.
Try this:
...
put the dgHilitedLines of group "seqGrid" into theLine
put the dgDataOfLine[theLine] of group "seqGrid" into theDataA
put textencode(theDataA["f0"],"UTF-8") into tf0Line
put textencode(theDataA["f1"],"UTF-8") into tf1Line
put textencode(theDataA["f2"],"UTF-8") into tf2Line
...
before sending the data to CasparCG.
Best
Klaus
Re: Read data in datagrid with æøå
Hello Klaus.
Indeed, that was just what I needed!
Thank you so much!
I will defanatly return with other questions.
Best regards Tue.
Indeed, that was just what I needed!
Thank you so much!
I will defanatly return with other questions.
Best regards Tue.