08-24-2023 09:07 AM
Glad you were able to come up with a solution. I tried reading and parsing the example text file with both LV2020 and LV2023 Q3, but can't reproduce the new line issue. Is your Windows language set to English, and using the English version of LabVIEW?
What if UseUnicode is set False? I've found that while it enables copying+pasting unicode text from external apps and a few other minor options, it isn't actually necessary. InterpAsUnicode / Force Unicode Text properties work just fine without it, as does unicode display. I prefer not to use it in the dev environment, as it's very easy to accidentally mix text encodings when copy+pasting.
The "č" character (c with caron, U+010D) can be normalized to its canonical decomposition form, and written as two codepoints c and combining caron (U+0063 U+030C), resulting in "č". I've replaced all instances of č (U+010D) with č (U+0063 U+030C) in the attached text file. Does this work in your original test code? It's not a great solution, but I'm curious if it works at all.
Another approach, and the one I've taken with my unicode library, is to operate using UTF-8 strings and convert to UTF-16LE only when necessary (ie. writing to LabVIEW's string controls). As UTF-8 is backwards compatible with ASCII, so most of LabVIEW's string functions can be used (with care), including the newline and tab delimiter matching performed by Spreadsheet String To Array. I've since added UTF-8 versions of the to/from spreadsheet functions to my library (currently on the dev branch), which wrap LabVIEW's own spreadsheet functions.
08-25-2023 05:04 AM
- My Windows is set to English and Labview as well
- UseUnicode=False seems to have solved the issue ! I cannot see the bad impact of this č character any more…
Thanks so much !
09-01-2023 08:12 AM
Hello again
Is there a possibility to display Unicode strings into the FP.Title property? Unlike for Booleans, Strings,... I do not see the 'interpret as Unicode' option for the 'Front Panel Window' property. Is there a workaround?
Thank you
Christophe
09-01-2023 09:12 AM
I highly doubt it. That is an entirely different part of LabVIEW that works with window management. Here LabVIEW uses the ANSI variants of APIs throughout and that would need to be changed to full Unicode support in every hook and cranny of the window manager with all its ugly adaptions to non Unicode handling for legacy support reasons. Not impossible but a very different part of LabVIEW than the control values for strings (and string type sub-objects).