Skip to contentSkip to conversation

build: windows: convert resources to UTF-8

PATCH In review Alon Bar-Lev 2 participants 5 messages Apr 28, 2012 – May 3, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: windows: convert resources to UTF-8

Visual Studio 2010 editor supports UTF-8 files, we can store files in standard encoding.

---
 src/openvpn/openvpn_win32_resources.rc   |    4 +++-
 src/openvpnserv/openvpnserv_resources.rc |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
src/openvpn/openvpn_win32_resources.rc +3 -1
index e1cd959..d092e21 100644
@@ -5,6 +5,8 @@
 #endif
 #include <winresrc.h>
 
+#pragma code_page(65001) /* UTF8 */
+
 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 
 VS_VERSION_INFO VERSIONINFO
@@ -28,7 +30,7 @@ BEGIN
             VALUE "FileDescription", "OpenVPN Daemon"
             VALUE "FileVersion", PACKAGE_VERSION ".0"
             VALUE "InternalName", "OpenVPN"
-            VALUE "LegalCopyright", "Copyright � The OpenVPN Project" 
+            VALUE "LegalCopyright", "Copyright © The OpenVPN Project" 
             VALUE "OriginalFilename", "openvpn.exe"
             VALUE "ProductName", "OpenVPN"
             VALUE "ProductVersion", PACKAGE_VERSION ".0"
src/openvpnserv/openvpnserv_resources.rc +3 -1
index 9b79cb7..7980193 100644
@@ -5,6 +5,8 @@
 #endif
 #include <winresrc.h>
 
+#pragma code_page(65001) /* UTF8 */
+
 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 
 VS_VERSION_INFO VERSIONINFO
@@ -28,7 +30,7 @@ BEGIN
             VALUE "FileDescription", "OpenVPN Service"
             VALUE "FileVersion", PACKAGE_VERSION ".0"
             VALUE "InternalName", "OpenVPN"
-            VALUE "LegalCopyright", "Copyright � The OpenVPN Project" 
+            VALUE "LegalCopyright", "Copyright © The OpenVPN Project" 
             VALUE "OriginalFilename", "openvpnserv.exe"
             VALUE "ProductName", "OpenVPN"
             VALUE "ProductVersion", PACKAGE_VERSION ".0"
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 47 lines · Alon Bar-Lev

Visual Studio 2010 editor supports UTF-8 files, we can store files in standard encoding.

---
 src/openvpn/openvpn_win32_resources.rc   |    4 +++- src/openvpnserv/openvpnserv_resources.rc |    4 +++-

 2 files changed, 6 insertions(+), 2 deletions(-)
src/openvpn/openvpn_win32_resources.rc +2 -0
index e1cd959..d092e21 100644
@@ -5,6 +5,8 @@
  #endif
  #include <winresrc.h>
 
+#pragma code_page(65001) /* UTF8 */
+

 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL

 VS_VERSION_INFO VERSIONINFO

src/openvpn/openvpn_win32_resources.rc +0 -0
@@ -28,7 +30,7 @@ BEGIN

            VALUE "FileDescription", "OpenVPN Daemon"
            VALUE "FileVersion", PACKAGE_VERSION ".0"
            VALUE "InternalName", "OpenVPN"
-            VALUE "LegalCopyright", "Copyright © The OpenVPN Project"
+            VALUE "LegalCopyright", "Copyright © The OpenVPN Project" VALUE "OriginalFilename", "openvpn.exe"
            VALUE "ProductName", "OpenVPN"
            VALUE "ProductVersion", PACKAGE_VERSION ".0"

src/openvpnserv/openvpnserv_resources.rc +2 -0
index 9b79cb7..7980193 100644
@@ -5,6 +5,8 @@
  #endif
  #include <winresrc.h>
 
+#pragma code_page(65001) /* UTF8 */
+

 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL

 VS_VERSION_INFO VERSIONINFO

src/openvpnserv/openvpnserv_resources.rc +0 -0
@@ -28,7 +30,7 @@ BEGIN

            VALUE "FileDescription", "OpenVPN Service" VALUE "FileVersion", PACKAGE_VERSION ".0"

Quoted 9 lines

            VALUE "InternalName", "OpenVPN"
-            VALUE "LegalCopyright", "Copyright © The OpenVPN Project"
+            VALUE "LegalCopyright", "Copyright © The OpenVPN Project" VALUE "OriginalFilename", "openvpnserv.exe" VALUE "ProductName", "OpenVPN"
            VALUE "ProductVersion", PACKAGE_VERSION ".0"
--
1.7.3.4

David,

You probably need to pull[1] this one, as there is no way to send files in two different encoding using S/MIME.

At least one thing that is good about visual C 2010... :)

Alon.

[1] https://github.com/alonbl/openvpn/commit/07f346fe2960e343e9dc9f94a6f2951c0814e168.patch

#2 lore raw
In reply to Alon Bar-Lev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Alon Bar-Lev

Visual Studio 2010 editor supports UTF-8 files, we can store files in standard encoding.

src/openvpn/openvpn_win32_resources.rc   |    4 +++- 
src/openvpnserv/openvpnserv_resources.rc |    4 +++- 2 files

changed, 6 insertions(+), 2 deletions(-)

I'm not giving it a NACK, just thinking aloud. Would it make the world simpler and easier if we just skipped this fancy copyright symbol with '(C)'? Unless there are other characters "outside 7 bit ASCII" table in these files, maybe that would be just as good?

Just a thought.

kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+cTO8ACgkQDC186MBRfrpIywCeMiq07E+i6P18ghguRQqpLP5j +HIAnicYeKF7iuEUjLjtG7+s4+9bwkLa
=5c8o
-----END PGP SIGNATURE-----

#3 lore raw
Quoted 12 lines · David Sommerseth

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Alon Bar-Lev

Visual Studio 2010 editor supports UTF-8 files, we can store files in standard encoding.

src/openvpn/openvpn_win32_resources.rc   |    4 +++- src/openvpnserv/openvpnserv_resources.rc |    4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)

Quoted 6 lines

I'm not giving it a NACK, just thinking aloud.  Would it make the world simpler and easier if we just skipped this fancy copyright symbol with '(C)'?  Unless there are other characters "outside 7 bit ASCII" table in these files, maybe that would be just as good?

Just a thought.

Well, we can write plain ASCII "(C)"...
But in Windows in most cases the unicode (C) character is used... Now finally that Visual studio supports UTF-8, it is even simpler (possible) to maintain UTF-8 only tree!
So question was correct to old times, now there is no overhead.

Alon.

#4 lore raw
In reply to Alon Bar-Lev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Alon Bar-Lev

Visual Studio 2010 editor supports UTF-8 files, we can store files in standard encoding.

src/openvpn/openvpn_win32_resources.rc   |    4 +++- 
src/openvpnserv/openvpnserv_resources.rc |    4 +++- 2 files

changed, 6 insertions(+), 2 deletions(-)

ACK, based on discussion. Applied to master branches on -testing and
- -stable trees.

commit a0e8911bf3ce72178e72784f744556bef20727b3

Author: Alon Bar-Lev <[email protected]...>
Date:   Sat Apr 28 21:29:01 2012 +0300
    build: windows: convert resources to UTF-8

    Signed-off-by: Alon Bar-Lev <[email protected]...>
    Acked-by: David Sommerseth <[email protected]...>
    Message-Id: [email protected]...
    URL: http://article.gmane.org/gmane.network.openvpn.devel/6380
    Signed-off-by: David Sommerseth <[email protected]...>

kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+iNXcACgkQDC186MBRfrreGQCgpWfny+sCr9B/9wHc7wb+qB+w UvUAn1XCQx+hN6S5q1EGmpDV7uTZ22Ed
=aq4f
-----END PGP SIGNATURE-----