]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for decoding of utf-16 surrogates. Also remove #include that's not needed
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Wed, 30 Mar 2005 22:00:19 +0000 (22:00 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Wed, 30 Mar 2005 22:00:19 +0000 (22:00 +0000)
after all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/strconv.cpp

index a43f43550f6347db67a7cd2a0a82f1bd4f07d646..4741650e156b640c5b4712b60576c49b351f0991 100644 (file)
@@ -55,9 +55,6 @@
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
-#ifdef HAVE_LANGINFO_H
-  #include <langinfo.h>
-#endif
 
 #if defined(__WIN32__) && !defined(__WXMICROWIN__)
     #define wxHAVE_WIN32_MB2WC
@@ -155,7 +152,7 @@ static size_t decode_utf16(const wxUint16* input, wxUint32& output)
         output = *input;
         return 1;
     }
-    else if ((input[1]<0xdc00) || (input[1]>=0xdfff))
+    else if ((input[1]<0xdc00) || (input[1]>0xdfff))
     {
         output = *input;
         return (size_t)-1;