|
Boost Users : |
Subject: Re: [Boost-users] Unicode regex example
From: Stefan Schweter (stefan_at_[hidden])
Date: 2013-08-14 05:09:08
> The "Ã" is treated as upper case if std::locale treats it as upper
> case - I would sort of expect that to be the case - but apparently
> not :-(
>
Hi John,
thanks for std::locale hint!
This piece of code does now work:
std::setlocale(LC_ALL, "");
boost::wregex condition;
condition.imbue(std::locale(""));
condition.assign(L"\\p{u}");
std::wstring test_word(L"Ã");
if (boost::regex_match(test_word, condition)) {
std::wcout << L"Matches!" << std::endl;
}
Regards,
Stefan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net