-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange problem with a WMI query and non ascii characters #187
Comments
Have you tried playing with the locale option? |
Locale did not change anything. However, after 3 hours, I got it working. I think it comes from the message size, where you use the number of characters, instead of the size in bytes. In http_transport, line 168 : Does it looks good to you ? |
Ah hah! So we have some double byte characters causing the message length != message byte size I presume. |
Yes, as UTF-8 uses 1 to 4 bytes for a single characters. 'é' uses 2, in "Docs périmés". I did not search winrm documentation, but it is most likely expecting the size of the message in bytes, and not the number of character. Which makes sense. |
I found this in the WSMV spec: |
Done |
Problem when message has multibyte characters (#187)
Following #143 , I now have a problem I can't debug.
I'm still using the same query :
ASSOCIATORS OF {Win32_Directory.Name="#{path}"} WHERE AssocClass = Win32_Subdirectory ResultRole = PartComponent
When the path contains 'é', and most likely other accented characters, I get an error :
WinRM/lib/winrm/http/response_handler.rb:79:in
raise_transport_error': Bad HTTP response returned from server (400). (WinRM::WinRMHTTPTransportError)`The SOAP response is indeed bad, in fact totally empty :
The exact query is :
ASSOCIATORS OF {Win32_Directory.Name="e:\\Maldi-Tof\\ESEC\\doc périmés"} WHERE AssocClass = Win32_Subdirectory ResultRole = PartComponent
Running the query remotely from windows seven works.
I've been searching the whole afternoon, but to no avail.
Do you have an idea ?
The text was updated successfully, but these errors were encountered: