--- utf8_codecvt_facet.cpp.original 2003-11-19 10:57:52.000000000 +0300 +++ utf8_codecvt_facet.cpp 2003-11-19 10:58:46.000000000 +0300 @@ -112,7 +112,7 @@ while (from != from_end && to != to_end) { // Check for invalid UCS-4 character - if (*from >= WCHAR_MAX) { + if (*from > WCHAR_MAX) { from_next = from; to_next = to; return std::codecvt_base::error;