Skip to contentSkip to conversation

Change in openvpn[master]: Set UTF-8 as the codepage using manifest declaration

Openvpn-devel In review selvanair (Code Review) 3 participants 7 messages Nov 28, 2025 – Dec 1, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1764370297000.Ic4e233c788b16a862c1fddcf314a3da661072fb5@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1413?usp=email

to review the following change.

Change subject: Set UTF-8 as the codepage using manifest declaration
......................................................................

Set UTF-8 as the codepage using manifest declaration

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 <[email protected]...>

Ref: https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

Change-Id Ic4e233c788b16a862c1fddcf314a3da661072fb5

---
M src/openvpn/openvpn.manifest

1 file changed, 5 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/13/1413/1

src/openvpn/openvpn.manifest +5 -0
index fa5b3d7..f964152 100644
@@ -14,6 +14,11 @@
             <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>

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1413?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic4e233c788b16a862c1fddcf314a3da661072fb5
Gerrit-Change-Number: 1413
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: cron2, plaisthos, selvanair.

stipa has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1413?usp=email )

Change subject: Set UTF-8 as the codepage using manifest declaration
......................................................................

Patch Set 1: Code-Review+2

(1 comment)

Patchset:

PS1:
I haven't tested certificate loading, but otherwise it works and the change is according to the doc https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page#set-a-process-code-page-to-utf-8

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1413?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic4e233c788b16a862c1fddcf314a3da661072fb5
Gerrit-Change-Number: 1413
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: selvanair <[email protected]...>
Gerrit-Comment-Date: Mon, 01 Dec 2025 08:57:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

#3 lore raw

PATCH 1/1 Set UTF-8 as the codepage using manifest declaration

In reply to a message not in the archive

From: Selva Nair <[email protected]...>

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 <[email protected]...>

Ref: https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

Change-Id Ic4e233c788b16a862c1fddcf314a3da661072fb5

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1413
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1413
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Lev Stipakov <[email protected]...>

src/openvpn/openvpn.manifest +5 -0
index fa5b3d7..f964152 100644
@@ -14,6 +14,11 @@
             <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>
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: Set UTF-8 as the codepage using manifest declaration

I have not tested it, nor fully read the documenation and the background info - but the explanation makes sense. Since this does not affect code, all I tested was "does it still build?" - and it does (mingw).

I have added a reference to GH #920, as it seems we received multiple reports on this.

Your patch has been applied to the master branch.

commit bcc7fb2d626ac428401a7877a8cc0098999a077e

Author: Selva Nair
Date:   Mon Dec 1 10:01:03 2025 +0100
     Set UTF-8 as the codepage using manifest declaration

     Signed-off-by: Selva Nair <[email protected]...>
     Acked-by: Lev Stipakov <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1413
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg34805.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw

Re: [Openvpn-devel] [PATCH applied] Re: Set UTF-8 as the codepage using manifest declaration

Quoted 4 lines

I have added a reference to GH #920, as it seems we received multiple reports on this.

Thanks. In fact, I attributed the "reported by:" to a wrong person --- oops!

Selva

#6 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1413?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by stipa

Change subject: Set UTF-8 as the codepage using manifest declaration
......................................................................

Set UTF-8 as the codepage using manifest declaration

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 <[email protected]...>

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

Change-Id Ic4e233c788b16a862c1fddcf314a3da661072fb5

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1413
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34805.html

---
M src/openvpn/openvpn.manifest

1 file changed, 5 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/13/1413/2

src/openvpn/openvpn.manifest +5 -0
index fa5b3d7..f964152 100644
@@ -14,6 +14,11 @@
             <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>

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1413?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic4e233c788b16a862c1fddcf314a3da661072fb5
Gerrit-Change-Number: 1413
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>

#7 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1413?usp=email )

Change subject: Set UTF-8 as the codepage using manifest declaration
......................................................................

Set UTF-8 as the codepage using manifest declaration

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 <[email protected]...>

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

Change-Id Ic4e233c788b16a862c1fddcf314a3da661072fb5

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1413
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34805.html

---
M src/openvpn/openvpn.manifest

1 file changed, 5 insertions(+), 0 deletions(-)
src/openvpn/openvpn.manifest +5 -0
index fa5b3d7..f964152 100644
@@ -14,6 +14,11 @@
             <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>

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1413?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic4e233c788b16a862c1fddcf314a3da661072fb5
Gerrit-Change-Number: 1413
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>