LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Wolfgang

support of Unicode character set

Status: In Development

 

Hi Wolfgang,

 

Thank you for your post. We have been in development of adding unicode support to LabWindows/CVI for a little while now. As it is a large feature, users should see unicode support added in the next couple of years.

 

Regards,

 

Collin Draughon

LabWindows/CVI Product Manager

National Instruments

support of Unicode character set would be most welcome

14 Comments
LuisG
NI Employee (retired)
Status changed to: Under Consideration
 
MarcelK
Member

I second this wish. And actually it shouldn't be that difficult, it could even be handled more conveniently than Windows itself does it: Win9x compatibility is of no concern anymore anyway, so a switch from the -A to the -W APIs poses no problem. Now, instead of redesigning the whole CVI API to accept wide characters, stick a MultiByteToWideChar call before every UI/Text API call and convert the string according to the character set of the meta font. This is what Windows does internally for the -A APIs anyway and this way old CVI code remains 100% compatible. The only twist is that you can now allow UTF-8 as another "character set", which MultiByteToWideChar already knows how to handle, and voila, complete Unicode compatibility.

 

No compiler change (for wide strings), no API change, just a few adjustments to the runtime library... I mean yeah, there might be a few more details to worry about, but the important thing is that Unicode support doesn't need to be UTF-16. In my opinion UTF-8 is more convenient anyway!

MarcelK
Member

Well, the idea didn't leave me alone, so I made a proof of concept. I actually patched some quick&dirty UTF-8 support right into cvirte.dll and it WORKS Smiley LOL In less than a day. Static controls work, string controls work, tables... I even got keyboard entry working just now. Funny thing is, for Chinese the string control in my solution actually seems to work much better than with CVI's native GB2312 support!

 

UTF-8 sample 

 

So I suppose I'm the first person to ever have run a Unicode CVI application? Now imagine what could be done if I had the damn cvirte source code... Smiley Frustrated

 

Of course for a real implementation quite a bit more work has to be done, like updating the UIR and text editor. This line e.g. currently looks a bit messy in my example:

SetCtrlVal(panel, PANEL_STRING, "äöü下载频道");

But as seen in the picture it still renders nicely in the UI, Chinese characters and all. So overall Unicode support really seems more than just achievable. I hope the NI engineers take this as a challenge Smiley Happy

 

In case anybody is curious, a patch to GetTextExtentPointA, ExtTextOutA, a few MBCS functions like mbsinc and a little alteration to the message loop for keyboard support was all it took.

Steve_Macha
Member

I also would second this wish.  In fact it should have already put in place.  Localization requires more than a utility to augment the GUI.  Message output and keyboard input must also be localized.

HuuDNguyen
Member

I'm so supprise until now, CVI 2013 Sp2 still not support the unicode

Miso111
Member

We have sooo many users which would be extremely happy to see unicode working in our GUI. Please do this small step for you and BIG for us. Thank you!

french_eddy
Member

I has implemented a localization GUI system in my application, that read GUI text in XML - UTF-8  file.

But I can't read  UTF-8 MultiByte in XML file to set Chinese characters in my GUI.

Please, get CVI 2014 support unicode !

 

 

scottrod
Member

Yes, lack of Unicode is a problem for me trying to read in simple data files from a Fluke device.

 

Shouldn't be a need for a coding work-around with CVI 2013. C'mon...

french_eddy
Member

We need to export our application in China. The two choise are:

- Waiting for NI Labwindow CVI support multibyte caracters.

- Re-code the application with Qt or C# that suport them.

I prefer the The first one. But how long time my Boss can wait ?

 

TheNIDragon
NI Employee (retired)
Status changed to: In Development

 

Hi Wolfgang,

 

Thank you for your post. We have been in development of adding unicode support to LabWindows/CVI for a little while now. As it is a large feature, users should see unicode support added in the next couple of years.

 

Regards,

 

Collin Draughon

LabWindows/CVI Product Manager

National Instruments

Collin D.
Software Product Manager