Welcome! Log In Create A New Profile

Advanced

[PATCH] Win32: PCRE2 Unicode support with MSVC

Sergey Kandaurov
March 20, 2023 11:00AM
# HG changeset patch
# User Sergey Kandaurov <pluknet@nginx.com>
# Date 1679324252 -14400
# Mon Mar 20 18:57:32 2023 +0400
# Node ID d0b013a7050e00613804b399ae2ca74551b2a071
# Parent 8771d35d55d0a2b1cefaab04401d6f837f5a05a2
Win32: PCRE2 Unicode support with MSVC.

Unicode support in PCRE2 is enabled by default on configure/cmake side
by defining SUPPORT_UNICODE. Previously, this macro was not defined
when compiling directly PCRE2 sources for Windows with MSVC.

In particular, this change allows to specify Unicode properties, such as
\P, \p, or \X, as caught by http_server_name.t adjusted to run on Windows:

nginx: [emerg] pcre2_compile() failed: this version of PCRE2 does not have
support for \P, \p, or \X

diff --git a/auto/lib/pcre/make b/auto/lib/pcre/make
--- a/auto/lib/pcre/make
+++ b/auto/lib/pcre/make
@@ -61,7 +61,7 @@ if [ $PCRE_LIBRARY = PCRE2 ]; then

PCRE_CFLAGS = -O2 -Ob1 -Oi -Gs $LIBC $CPU_OPT
PCRE_FLAGS = -DHAVE_CONFIG_H -DPCRE2_STATIC -DPCRE2_CODE_UNIT_WIDTH=8 \\
- -DHAVE_MEMMOVE
+ -DHAVE_MEMMOVE -DSUPPORT_UNICODE

PCRE_SRCS = $ngx_pcre_srcs
PCRE_OBJS = $ngx_pcre_objs
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Win32: PCRE2 Unicode support with MSVC

Sergey Kandaurov 538 March 20, 2023 11:00AM

Re: [PATCH] Win32: PCRE2 Unicode support with MSVC

Maxim Dounin 181 March 20, 2023 07:56PM

Re: [PATCH] Win32: PCRE2 Unicode support with MSVC

Sergey Kandaurov 175 March 21, 2023 05:52AM

Re: [PATCH] Win32: PCRE2 Unicode support with MSVC

Maxim Dounin 207 March 21, 2023 03:50PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 80
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready