]> git.feebdaed.xyz Git - 0xmirror/openvpn.git/commitdiff
Set UTF-8 as the codepage using manifest declaration
authorSelva Nair <selva.nair@gmail.com>
Mon, 1 Dec 2025 09:01:03 +0000 (10:01 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 1 Dec 2025 11:09:19 +0000 (12:09 +0100)
Works on Windows 10+. This ensures any UTF-8 string we pass to
ANSI API will not get interpreted in some local code page
in effect at runtime.

Although we do not use any such API, OpenSSL dll we link to
does (e.g., the store API used for reading certificate and
key from files). OpenSSL may fix this in future versions,
but this is an easy workaround that looks harmless and appropriate.

Fixes failure to read certificates when filenames contain non-ascii
characters reported by: Carsten Mietzsch <Carsten.Mietzsch@atelios.de>

Ref: https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
Github: OpenVPN/openvpn#920

Change-Id: Ic4e233c788b16a862c1fddcf314a3da661072fb5
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1413
Message-Id: <20251201090110.5487-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34805.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/openvpn.manifest

index fa5b3d7f44fadef0fe2c538a9a03c9f200ad805b..f9641521979c1da408d8977bbc7d451de9eff416 100644 (file)
             <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
         </application>
     </compatibility>
+    <application>
+        <windowsSettings>
+            <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
+        </windowsSettings>
+    </application>
     <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
         <security>
             <requestedPrivileges>