-
Notifications
You must be signed in to change notification settings - Fork 405
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
The text is displayed abnormally #491
Comments
In the sources for Chinese-simplified we have "OpenVPN GUI 已经运行. 右击任务栏图标启动." Not sure why one character is garbled on your display. See the link for the line in the source -- does it show up correctly on your machine? openvpn-gui/res/openvpn-gui-res-zh-hans.rc Line 527 in 79f5cb9
|
This notification displays correctly on my English version of Windows 10 with language selected as Chinese in the settings menu of OpenVPN-GUI. |
@selvanair , it was very easy (for me) to run win11 on my dev machine. or maybe those prepared images: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ |
|
The suggestion to disable UTF-8 beta was a stab in the dark.. |
Looks good to me ... |
No such error on my Win 10 (English) desktop. Is this also WIndows 11? |
On the other hand, I cannot reproduce it with openvpn-gui.exe built locally or from GitHub Actions. @playday3008 could you try out this executable? https://github.com/OpenVPN/openvpn-gui/suites/6443033222/artifacts/235955420 |
|
I checked locally-built installer and it works fine. Then I checked official installers and noticed that problem has appeared since 2.5.3 - 2.5.2 and older works fine. |
So, what's next? How to fix that bug? |
@mattock do you happen to remember what has changed since 2.5.3? Have we switched to MSVC building? Maybe some settings on build machine? |
I am not sure the problem is in -gui changes. As we could see, GitHub Actions-built and locally-built binaries work fine - there is probably some change in build environment which has caused it. |
Aha, I can also reproduce these using the release binary (including @z2z2qp 's original report for simplified chinese) -- I have been testing using a local build. Has to be a release build issue as locally built GUI work fine as Lev mentioned. Hard to think of how something in the build system could cause this though. |
2.5.7 which was released after this report, still has the same problem, |
It seems we still have this issue unresolved in 2.6_beta2. Wonder what change in the build process could have caused this. GHA build looks fine, only the "official" release builds are affected. |
Windows 7, OpenVPN version 2.6.3, OpenVPN GUI 11.41.0.0, OS language and OpenVPN GUI Russian. In the "display status" window, part of the message in Russian with the wrong character set (highlighted in the screenshot). If you select "show log" and open it in Notepad++, it shows character set Cyrillic Macintosh instead of the usual Cyrillic Windows-1251, while the word "Элемент" is displayed incorrectly as "Ёлемент" (highlighted in the screenshot). |
The GUI and openvpn.exe treats all text as unicode, no ANSI code pages are involved. Log messages are displayed on the GUI status window by setting code page = CP_UTF8. Possibly there is an issue in openvpn.exe when Windows errors are converted to utf-8. Have to check. |
Note: this may be moved to OpenVPN/openvpn In error.c in openvpn we have
This will call the ANSI version and return "message" using the current code page while the implicit assumptions is that all strings are unicode in utf-8 encoding. I think we should call |
Is it necessary for me to do this, or can you do it more competently? |
As the original report in this thread is GUI-specific, we cannot transfer this. Instead, I opened a new issue in OpenVPN referring to this one. See OpenVPN/openvpn#319 |
Thank you for your excellent work. |
@mastezont Could you check whether openvpn.exe from the GHA artifacts below fixes it? https://github.com/selvanair/openvpn/actions/runs/4725113811#artifacts Replacing only openvpn.exe binary with one from above build should be enough. |
Thanks for testing
Its not about the default code page, but Unicode vs ANSI. The content of the log file is in Unicode. Most modern applications create Unicode files and ANSI code pages are only required to read legacy files. Set your editor to use Unicode/UTF-8. Notepad seems to do this automatically since Windows 10. No idea about notepad++. |
Thank you for the quick solution of the problem! |
Is KOI-8 still the thing? /me apologizes for hijacking the thread. |
I don't know how to define it. |
hello, everyone. I added BOM to res/openvpn-gui-res-ru.rc and my issue is gone. |
The report in #491 is against the release version, not a local build by the user. That said, we use |
Any news about this character problem? |
I have no problems with new versions. |
1、window 11
2、
3、显示乱码
此处乱码应该是“任务栏”的务
The text was updated successfully, but these errors were encountered: