12-09-2015 03:31 AM
Hello,
What is the standard output-encoding of System Exec.vi?
I am running System Exec.vi to gather system information with command cmd /c systeminfo on a machine with German language. The output contains german characters that are not displayed correctly. How can I change the encoding of standart output? I think it is ASCII encoded?
For example: Domäne is displayed as Dom„ne, Größe is displayed as Gr”áe.
Thanks.
Solved! Go to Solution.
12-09-2015 06:04 AM
12-09-2015 06:10 AM - edited 12-09-2015 06:16 AM
The system Exec VI is creating a command line console, and command line tools executed from that wille generelly use the OEM codepage while Windows GUI applications use the ANSI codepage. The actually used codepages for both types depend on the system language setting. Generally the OEM (or originally called IBM) codepages were the codepages used in DOS. Microsoft used new codepage definitions for use under Windows, most likely just for the sake of being different than the rest , and calls them ANSI codepages. The two differ for most languages mostly only in where the different extended characters are located, not so much in which characters they contain.
While LabVIEW could try to convert the returned string from OEM to ANSI this is a pretty tricky adventure since they don't always convert losslessly from one to the other, and specific user configurations might cause Windows to actually use pretty incompatible codepages for each of the two. So any attempt to convert the string might actually cause serious dataloss that is not reversable after the fact.
12-09-2015 08:07 AM - edited 12-09-2015 08:08 AM
Thanks for answers. I solved my problem by replacing those characters with german ones as shown in attachment.
11-30-2017 11:06 AM
I have same case. But I use function in user32.dll