Changeset: e86c3cf880a0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e86c3cf880a0
Modified Files:
        clients/odbc/driver/ODBCUtil.c
Branch: default
Log Message:

Merge from Jul2012 branch.


diffs (22 lines):

diff --git a/clients/odbc/driver/ODBCUtil.c b/clients/odbc/driver/ODBCUtil.c
--- a/clients/odbc/driver/ODBCUtil.c
+++ b/clients/odbc/driver/ODBCUtil.c
@@ -224,14 +224,14 @@ ODBCutf82wchar(const SQLCHAR *s,
                                c |= *s++ & 0x3F;
                        }
                }
-               if ((c & 0xF8) == 0xD8) {
-                       /* UTF-8 encoded high or low surrogate */
-                       return "Illegal code point";
-               }
                if (c > 0x10FFFF) {
                        /* cannot encode as UTF-16 */
                        return "Codepoint too large to be representable in 
UTF-16";
                }
+               if ((c & 0x1FFF800) == 0xD800) {
+                       /* UTF-8 encoded high or low surrogate */
+                       return "Illegal code point";
+               }
                if (c <= 0xFFFF) {
                        if (--buflen > 0 && p != NULL)
                                *p++ = c;
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to