-
Notifications
You must be signed in to change notification settings - Fork 2
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
Not encoding chars correctly #5
Comments
@jrenton where did you write the output to? console? file? |
Just debugging it shows the string |
The actual problem is probably that the What encoding does the original dll normally expect its strings to be in? Because it seems the only choices available are "Ansi" and "Unicode" (which is utf-16), while the errors in the result seems to point towards ANSI-to-UTF-8 corruption. The input encoding set in the Document.cs source was UTF-8, though. I haven't fiddled around with this, but if it actually uses that setting even for String input, setting the DLLImport charset to Unicode and the input encoding to UTF-16-LE should solve it. |
Well, that didn't seem to work. The input encoding seems to be ignored, so setting the DllImport's Charset to Unicode just messes it up even more. In Document.cs, you can fix all this simply by treating the String input as a stream as well. Just replace the String constructor with this:
This also conveniently reduces On a related note... this prompted me to remove the |
I am using
and it is turning chars such as ’ “ ” into the unknown symbol �. I tried playing around with different encoding types but was unsuccessful.
The text was updated successfully, but these errors were encountered: