pawhan11 Posted February 20, 2018 Report Share Posted February 20, 2018 Cross post from NI forums. https://forums.ni.com/t5/LabVIEW/LV-text-rendering-MBCS-OS-Unicode/td-p/3740140 This translation topic keeps coming back to me from time to time when I was asked to provide multilanguage UI for Chinese and Eng. I have the problem in understanding how LV is rendering strings. So far I understand (I hope I do) that Windows uses unicode UTF16. In LV we do not have Unicode support and (we have some private functions but using them is too much pain) uses MBCS so we need codepage to tell how string needs to be rendered. In Windows we can set system locale that will tell non Unicode apps how to render strings? Assuming all that i have a problem understanding why this is displayed: It should display exactly what is on this codepage? If not can someone explain why it shows this results and some random digits at the end? Unicode strings can be converted to multibyte based on given codepage by using WideCharToMultiByte and MultiByteToWideChar. Assuming I have something written in russian/chinese (Unicode) we can convert that to MBCS based on codepage and display correctly for valid codepage in the system? I have looked at LV error files and they are stored in utf8 for xml files, so some sort of conversion must occur inside LV to correctly display this data? txt encoding of error files varies (at least that is what notepad++ is saying), for Chinese txt we have GB2312, when system locale is set to China I assume this coding will be used to render text in LV? 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.