Skip to content
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

Character encoding issue #92

Closed
garciaaa opened this issue May 10, 2020 · 3 comments · Fixed by #111
Closed

Character encoding issue #92

garciaaa opened this issue May 10, 2020 · 3 comments · Fixed by #111
Labels
bug Something isn't working High Priority This should be solved ASAP i18n Internationalization support

Comments

@garciaaa
Copy link

There is problem in NativeTextRenderer while using non-english national characters (Russian in my case). Multiline render used in label control shows wrong characters.
It can be fixed adding charset while importing "DrawText" from user32.dll like this:
[DllImport("user32.dll", CharSet = CharSet.Auto)]
instead of
[DllImport("user32.dll")]
I dunno why, but gdi32's TextOut do not cause any problem with charset.
(Russian Win7, Win10, .net 4.x, .net core 3.1)

@leocb
Copy link
Owner

leocb commented May 10, 2020

Hi! Thank you for this info, related to #10. I'll fix this ASAP

@leocb leocb added bug Something isn't working High Priority This should be solved ASAP i18n Internationalization support labels May 10, 2020
@garciaaa
Copy link
Author

To show off problem there are Russian letters shown nearby nearby chinese in #10. Roboto fonts you ship with your great package DOES contain cyrillic (russian) subset

@leocb
Copy link
Owner

leocb commented May 10, 2020

Yeah, I didn't know how to fix it, I never messed with different encoding on the same app, thanks for finding out such an easy fix. Feel free to open a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working High Priority This should be solved ASAP i18n Internationalization support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants