Listbox & unicode

karageurkarageur Junior MemberPosts: 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!

Comments

  • karageurkarageur Junior Member Posts: 97
    I tried many combinations with no luck.
    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

  • karageurkarageur Junior Member Posts: 97
    "'^LDA-',itoa(LIST_TABLE_CONTENT_ADDRESS),',1,', itoa(strContent.nIndex),',',strContent.wcName,',"',itoa(LIST_TABLE_CONTENT_PORT),',',itoa(strContent.nIndex),'"'"

    Here is straight forward sending - strContent.wcName


    Any ideas ???
  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    karageur wrote: »
    "'^LDA-',itoa(LIST_TABLE_CONTENT_ADDRESS),',1,', itoa(strContent.nIndex),',',strContent.wcName,',"',itoa(LIST_TABLE_CONTENT_PORT),',',itoa(strContent.nIndex),'"'"

    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)?
  • karageurkarageur Junior Member Posts: 97
    I haven't told TS yet.
    The strings are identical because the source is one & the same - strContent.wcName.
    I tried only on iDevice.
  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    karageur wrote: »
    I haven't told TS yet.
    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
  • karageurkarageur Junior Member Posts: 97
    Is R4 suitable for this?
  • Touch Panel Control TeamTouch Panel Control Team AMX Authorized Product Partner Posts: 337
    Unicode parsing for the ^LDA command has now been added in TPControl, and will be included in a future application release.

    Thanks for the clear example/description.
Sign In or Register to comment.