LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System Exec.vi output encoding

Solved!
Go to solution

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.

0 Kudos
Message 1 of 5
(3,871 Views)

Hi,

 

 

This link might help you.

 

Thanks

Pankaj

0 Kudos
Message 2 of 5
(3,839 Views)

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 Smiley Very Happy, 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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 5
(3,830 Views)
Solution
Accepted by topic author kahlenberg

Thanks for answers. I solved my problem by replacing those characters with german ones as shown in attachment.

 

 

0 Kudos
Message 4 of 5
(3,804 Views)

I have same case. But I use function in user32.dll

 

Message 5 of 5
(3,016 Views)