06-02-2011 02:18 PM
I'm developing software that requires support for chinese language, I've followed the instructions to change this settings for LabVIEW 8.6 (http://digital.ni.com/public.nsf/allkb/91A1863834F4B1A0862575670067D15C) and TestStand 4.1 (http://forums.ni.com/t5/NI-TestStand/Operator-interface-Chinese-language-support/m-p/375100) but I haven't been able to find information on how to do this in CVI 8.5.
When I enable the support for characters in Chinese on my XP machine and I open the CVI files they are shown like this:
What do I need to do to get this working?
Thanks!
<<-N->>
CLA - CTA
06-03-2011 09:38 AM
Hi N,
Here is a link that explains how to set up LabWindows/CVI to handle displaying other languages. I hope this helps! Have a great day!
How do I change the display language in LabWindows/CVI under Windows XP?
06-03-2011 11:43 AM
Hi Taylor,
I changed the settings as suggested in the KB (see screenshot, they are the same LV uses) but nothing changes, any other ideas.
06-03-2011 12:45 PM
I called NI for support and got CVI to work by changing my setting as shown below:
But now all my chinese text in LabVIEW and TestStand shows as "?????????????????????????".
What is the secret recipe for language consistency across all these environments?
<<-N->>
06-06-2011 04:20 PM
Hi N,
Thanks for the detailed troubleshooting steps and screenshots! I would like to clarify what you are looking for, though. Are you wanting to code in a different language, or simply have CVI be able to recognize Chinese characters and be able to display them, for instance, in comments in the code? I will try and speak with the engineer you spoke with by calling in, too. Thanks for the heads up, N! Have a great day!
06-08-2011 02:55 PM
Hi Taylor,
Thanks for your response, I haven't heard from NI support in a couple of days. All I'm trying to do is:
1. Get TestStand to work with chinese characters, i.e. allow me to write chinese chars within my sequence file and display them using TS steps
2. Get LabVIEW to work with chinese characters, i.e. allow me to write chinese chars in a VI and display them.
3. Get CVI not to automatically modify my files when I update the settings to make LV and TS to do 1 and 2 following the instructions of NI's KB
4. Get my CVI compiled dll's to work in a computer with the settings suggested in the KB, seems like changinig these settings breaks the compiled byte code!!!
The IDE versions are: TS 4.1, LV8.6F1, CVI 8.5.1
Any help would be greatly apprecciated, if CVI is not able to handle this it would be great to know that too so we can create a contingency plan and move on knowing that this limitation exits. We've already spent last week and this trying to figure out how to deal with this.
Thanks!
<<-N->>
CLA - CTA
06-09-2011 10:41 AM
Hello -
I appreciate you're clear list of requirements in your previous post, but I'm still a little unclear on exactly what you're trying to achieve with CVI. Let me give a little explanation of what you're seeing, and then I'll ask a couple questions.
When you change the "Language for non-Unicode programs" to be Chinese, you are modifying the native code page for every non-unicode program running on your pc. As you've noticed, this is what allows you to display Chinese characters in both TestStand and LabVIEW. However, it is exactly this setting which is "changing" your CVI code. What is happening to your CVI code can be pretty easily explained - in the strings you have circled in your first post, you must have a character whose ascii value is higher than 128 (such as ‡ or »). When you change your "Langauge for ..." to be Chinese, this high value character is interpreted as a lead by in a dual byte character, and when combined with the following byte, the dual byte Chinese character is displayed. The contents of your file haven't changed at all, but the font you're using is now interpreting those contents differently. I would guess that if you copied the same string into LabVIEW or TestStand, you would see the same result.
The truth of the matter is that you don't actually need to change this setting on your development machine. When you compile your code and include the dual-byte strings (that show up as ???? when your language is set to English), those strings will be displayed as dual-byte Chinese characters when deployed to a computer that has enabled Chinese as the "Language for..."
What's unclear to me is what you're trying to achieve in CVI. What do you want to be displayed with Chinese characters? Is it strings on your UI? Strings in your source code? Can you please clarify exactly what you're trying to do with CVI, and what isn't working?
In short, when you change the language on your development machine, your strings containing what are now lead bytes in a dual byte character string will be displayed as dual byte characters. CVI is not modifying your files, it is just displaying the string you entered in the context of the new code page.
NickB
National Instruments
06-09-2011 01:51 PM
Hi Nick,
Thanks for your reply, I understand the multi-byte character setting modifies the way things are shown in the ANSI environment. I explained this to AE engineering when they were trying to reproduce my problem changing the computer language to Spanish, when I called I mentioned how I was able to "see" the original CVI code with Notepad++ (a free tool for text editing) with OS Chinese language settings by changing the enconding.
The truth of the matter is that I actually DO need to change this setting on my development machine in order to see what I am typing in TestStand and LabVIEW otherwise I would need either two development computers or restarting every time I switch NI IDEs... that does not sound very practical. Seriously, what I'm really looking for is consistency accros my NI development environments so I can develop applications in a multilingual environment.
So basically, this is what I want out of CVI:
- I am not looking to use Chinese language in my CVI code (no Chinese strings, messages, etc)... we only use CVI for IVI drivers. I just want to be able to read and compile what I already have in my files while I'm also using TestStand and LabVIEW in Chinese language.
- I also want my binaries to work in a computer with the Chinese language settings so I can deploy my TestStand solutions worldwide (including LV, CVI, Java, .NET), all of these but CVI just work. Is this possible? Personally, I don't think that the fact that the language settings break the binary code is acceptable, do you?
<<-N->>
CLA - CTA
06-09-2011 02:27 PM
I understand. Unfortunately, the CVI editor does not allow you to select the encoding used to display your source code. This would be a great thing to add in the CVI Idea Exchange.
I'm not sure I understand how your binary compatibility is being broken though. Can you give an example of this, perhaps with some source code?
NickB
National Instruments
06-09-2011 06:59 PM - edited 06-09-2011 07:02 PM
Hi Nick,
I created a simplified function in my driver just to show how it breaks, I'm attaching the source code and a VI I'm using to test this.
My machine settings are initially in English so I can compile the code. Within the attached project I created a function called tktds8k_SetDataStartNIExample function that runs regardless of wheter you have an instrument or not. Within this function all I'm doing in sending a command using:
sprintf(buffer,"DATA:STARt %d",0);
Using the _tktds8k ExampleNI.vi VI I run the function and take look at what is sent with NISpy, and this is what I see:
Then I change the language settings to Chinese and run the same VI and this is what I see:
In production test run I get errors along the lines of passing toom any arguments to a function.
Regarding the CVI editor, I was under the impression that Idea Exchange was a feature request portal and to me this is a very serious defect in the software... there no guarantee the IDE will work in a multibyte environment for which we are buying dozens of licenses as part of the NI Developer Suite. Would you agree with this?
<<-N->>