machyaer Posted March 14, 2013 Report Share Posted March 14, 2013 Hello, I've a project with a multilanguage feature... at the start the application read into its .ini file the language to be used and then loads all the texts into a text file in that language... This works finely for "Occidental" languages but now I ought to use chinese characters enabling unicode... I tried with the instruciotns found on the web, but... 1 - all chars are doubled probably due to the different size of ascii chars and unicode ones (e.g. "hello" becomes "h e l l o ") - but this can be managed 2 - also EOLs are doubled - but also this can be managed 3 - chinese text are appeared - and this was what I was looking for 4 - going back to the english language all the ascii letters became chinese-styled... and to have back them I had to disable the unicode management... Does anyone have some solution? Thanks Max Quote Link to comment
Darin Posted March 14, 2013 Report Share Posted March 14, 2013 When it comes to unicode support in LV, the philosophy borrows from Kipling "East is East, West is West and never the twain shall meet." 1 Quote Link to comment
Tim_S Posted March 15, 2013 Report Share Posted March 15, 2013 Have you checked out: https://decibel.ni.com/content/docs/DOC-10153 ? This has everything you need to know about unicode and LabVIEW (ok, well not everything, but enough). Quote Link to comment
machyaer Posted March 18, 2013 Author Report Share Posted March 18, 2013 yes, I checked that document, but the only thing that I can manage is a text file... loading it in a string forced to be a unicode string I find english and/or chinese characters... but if I try to extract a portion of that text to be inserted in an array... all the characters, latin or chinese changes in others that have no significance in any language... original in text file: Home;家 (the same reading I find in the text box) after transfer in array : 䌀愀猀愀 (this should be home in latin letters) 똀 (and this is not the same as the previous and has no meaning in chinese) Max Quote Link to comment
Tim_S Posted March 18, 2013 Report Share Posted March 18, 2013 Can you post an example of your code that illustrates your problem? Quote Link to comment
machyaer Posted March 18, 2013 Author Report Share Posted March 18, 2013 attached there is an example that I was trying to use for testing... the only correct thing is the text string... in the arrays either latin or chinese strings are wrong... Max unicode.zip Quote Link to comment
ShaunR Posted March 18, 2013 Report Share Posted March 18, 2013 Labview doesn't (officially) support Unicode. There is a "hack" to display Unicode chars in indicators, but all labview functions/primitives still only support ASCII. You need to use the library that Tim_S linked to to even have a chance of manipulating unicode chars, which you are obviously not using. Quote Link to comment
machyaer Posted March 18, 2013 Author Report Share Posted March 18, 2013 Thanks ShaunR... your clear analisys of what was wrong help me find a solution... just I will use a file for each language instead of an unique file for the all languages... but it seems to be great... Max unicode_2.zip Quote Link to comment
ShaunR Posted March 18, 2013 Report Share Posted March 18, 2013 Thanks ShaunR... your clear analisys of what was wrong help me find a solution... just I will use a file for each language instead of an unique file for the all languages... but it seems to be great... Max Well. I've been there. I wrote a library for changing UI elements "on-the-fly" (passa mak). I deliberately excluded unicode since it is platform dependent, but it could be modified for a particular use case. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.