Index: trunk/extensions/AbuseFilter/parser_native/affunctions.cpp |
— | — | @@ -1,14 +1,15 @@ |
2 | | -#include "affunctions.h" |
3 | | -#include <algorithm> |
4 | | -#include <fstream> |
5 | | -#include <sstream> |
6 | | -#include <ios> |
7 | | -#include <iostream> |
8 | | -#include <ctype.h> |
| 2 | +#include <algorithm> |
| 3 | +#include <fstream> |
| 4 | +#include <sstream> |
| 5 | +#include <ios> |
| 6 | +#include <iostream> |
9 | 7 | |
10 | | -#include "utf8.h" |
11 | | -#include "equiv.h" |
| 8 | +#include "utf8.h" |
| 9 | +#include "equiv.h" |
| 10 | +#include "affunctions.h" |
12 | 11 | |
| 12 | +#include <unicode/uchar.h> |
| 13 | + |
13 | 14 | namespace afp { |
14 | 15 | |
15 | 16 | datum |
— | — | @@ -60,7 +61,7 @@ |
61 | 62 | for (; it != end; ++it) { |
62 | 63 | int chr = equivs.get(*it); |
63 | 64 | |
64 | | - if (chr != lastchr && isalnum(chr)) |
| 65 | + if (chr != lastchr && u_isalnum(chr)) |
65 | 66 | result.append(utf8::codepoint_to_utf8(chr)); |
66 | 67 | |
67 | 68 | lastchr = chr; |
— | — | @@ -97,7 +98,7 @@ |
98 | 99 | utf8::utf8_iterator<std::string::const_iterator> it(orig.begin(), orig.end()), end; |
99 | 100 | for (; it != end; ++it) { |
100 | 101 | len++; |
101 | | - if (!isalnum(*it)) |
| 102 | + if (!u_isalnum(*it)) |
102 | 103 | specialcount++; |
103 | 104 | } |
104 | 105 | |
— | — | @@ -121,7 +122,7 @@ |
122 | 123 | |
123 | 124 | utf8::utf8_iterator<std::string::const_iterator> it(orig.begin(), orig.end()), end; |
124 | 125 | for (; it != end; ++it) { |
125 | | - if (isalnum(*it)) |
| 126 | + if (u_isalnum(*it)) |
126 | 127 | result.append(utf8::codepoint_to_utf8(*it)); |
127 | 128 | } |
128 | 129 | |