Enable UTF and UCP support in PCRE

This commit is contained in:
Flaviu Tamas 2015-01-20 18:14:24 -05:00
commit 7c24290eec
3 changed files with 8 additions and 2 deletions

View file

@ -324,13 +324,13 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef SUPPORT_PCREGREP_JIT */
/* Define to any value to enable support for Unicode properties. */
/* #undef SUPPORT_UCP */
#define SUPPORT_UCP
/* Define to any value to enable support for the UTF-8/16/32 Unicode encoding.
This will work even in an EBCDIC environment, but it is incompatible with
the EBCDIC macro. That is, PCRE can support *either* EBCDIC code *or*
ASCII/UTF-8/16/32, but not both at once. */
/* #undef SUPPORT_UTF */
#define SUPPORT_UTF
/* Define to any value for valgrind support to find invalid memory reads. */
/* #undef SUPPORT_VALGRIND */

5
test/misc.nim Normal file
View file

@ -0,0 +1,5 @@
import unittest, nre
suite "Misc tests":
test "unicode":
check("".find(re("", "8")).match == "")

View file

@ -6,3 +6,4 @@ import split
import match
import replace
import escape
import misc