As you can see, I try to locate japanese strings and thus I need to take
the unicode variant of PCRE, for example:
std::wstring pattern = L"サービス内容";
std::wstring subject = L"ス内";
pcre32 *re;
const char *error;
unsigned int *pattern2;
unsigned int *subject2;
int erroffset;
int ovector[30];
int subject_length;
int rc;
pattern2 = .... // Conersion to unsigned int
subject2 = .... // Conersion to unsigned int
My problem seems to be the conversion from wstring to char or unsigned int
(depends on pcre or pcre16 or pcre32). I tried a lot of functions
(wcstombs_s, strings conversions with QString etc.) but without success.
The ovector[30] never holds the correct values I expect. Im' not really
sure what went wrong - pattern matching with non-unicode strings works fine.
Can somebody please give me a working example about how to detect unicode
patterns with PCRE? I become exasperated with myelf.