aiowmi icon indicating copy to clipboard operation
aiowmi copied to clipboard

Problem with charsets on replies from wmicserver with Windows in spanish

Open trentasis opened this issue 2 years ago • 6 comments

Hi, I’m having a problem where my wmic client makes a petition to wmicserver but receives a message with the wrong Charset.

This is the message in question:

OK – Found 1 Services(s), 1 OK and 0 with problems (0 excluded). ‘Administraci▒n de licencias de Escritorio remoto’ (TermServLicensing) is Running.|’Total Service Count’=1; ‘Service Count OK State’=1;;1; ‘Service Count Problem State’=0; ‘Excluded Service Count’=0;

As you can see… Administraci▒n accents fail.

Do you know a solution for this?

Windows is in Spanish.

trentasis avatar Feb 21 '23 12:02 trentasis

Not sure, but in encoded_string.py the library does the string encoding. It basically decodes using utf-16le.

joente avatar Feb 24 '23 12:02 joente

Could you try using the plain library without the wmicserver?

joente avatar Feb 27 '23 13:02 joente

With simple wmic client it works well, but when i use wmicserver i have that problem

would you recommend to change the enconding in encoded_string.py for another one?

trentasis avatar Mar 02 '23 13:03 trentasis

Hi, does anyone else know what to do about this problem?

trentasis avatar Mar 17 '23 11:03 trentasis

@trentasis , I've created pr #28 with the encoding forced to UTF-8. Can you test if this solves the issue?

joente avatar Mar 20 '23 18:03 joente

Hi, i tested it and still having the same issue:

OK - Found 1 Services(s), 1 OK and 0 with problems (0 excluded). 'Administraci▒n de licencias de Escritorio remoto' (TermServLicensing) is Running.|'Total Service Count'=1; 'Service Count OK State'=1;;1; 'Service Count Problem State'=0; 'Excluded Service Count'=0;

This if from nagios making a request to wmicserver, and wmicserver asking to a Windows Server in Spanish.

trentasis avatar Mar 22 '23 14:03 trentasis