Listbox & unicode
karageur
Posts: 97
Hi guys again!
New trouble with listboxes.
Does it really support UNICODE strings?
I use this command
"'^LDA-',itoa(LIST_TABLE_CONTENT_ADDRESS),',1,',itoa(strContent.nIndex),',',WC_TP_ENCODE(strContent.wcName),',"',itoa(LIST_TABLE_CONTENT_PORT),',',itoa(strContent.nIndex),'"'"
WC_TP_ENCODE(strContent.wcName) & uniflag = 1 here is NOT working as I get this result
These two marked strings have the same content.
Listbox code above
And this is button code (on the top of the screenshot)
"'^UNI-', itoa(LABEL_CHOOSEN_ENTRY) ,',0,',WC_TP_ENCODE(strContent[24].wcName)"
As you can see it shows OK.
But how to make listbox to show UNICODE string??
Anyone please!
New trouble with listboxes.
Does it really support UNICODE strings?
I use this command
"'^LDA-',itoa(LIST_TABLE_CONTENT_ADDRESS),',1,',itoa(strContent.nIndex),',',WC_TP_ENCODE(strContent.wcName),',"',itoa(LIST_TABLE_CONTENT_PORT),',',itoa(strContent.nIndex),'"'"
WC_TP_ENCODE(strContent.wcName) & uniflag = 1 here is NOT working as I get this result
These two marked strings have the same content.
Listbox code above
And this is button code (on the top of the screenshot)
"'^UNI-', itoa(LABEL_CHOOSEN_ENTRY) ,',0,',WC_TP_ENCODE(strContent[24].wcName)"
As you can see it shows OK.
But how to make listbox to show UNICODE string??
Anyone please!
0
Comments
One of the tries ...
"'^LDA-',itoa(LIST_TABLE_CONTENT_ADDRESS),',1,',itoa(strContent.nIndex),',',wc_encode(strContent.wcName, wc_format_utf8,1),',"',itoa(LIST_TABLE_CONTENT_PORT),',',itoa(strContent.nIndex),'"'"
wc_encode(strContent.wcName, wc_format_utf8,1) is used here
Here is straight forward sending - strContent.wcName
Any ideas ???
Looks like a bug to me. Have you reported this to AMX TS? If you send the same unicode text to the panel it should show up identically, list box or not. I would have to think there is a bug in the LDA command when processing unicode. Have you tried this on various panels including iDevices?
I haven't done anything with listboxes since they aren't well supported. I would just use TXT or UNI and not bother with list boxes myself.
Paul
PS: Are you storing these strings in an identical manner and using all the correct WC functions: WC_GET_BUFFER_STRING(wcMyString,3)?
The strings are identical because the source is one & the same - strContent.wcName.
I tried only on iDevice.
Have you got an AMX panel to try it on? I'm guessing its a panel problem not a code problem.
Paul
Thanks for the clear example/description.