Author: turnstep
Date: Sun Jan  6 17:25:17 2008
New Revision: 10482

Modified:
   DBD-Pg/trunk/dbdimp.c

Log:
Make ch unsigned, as a better workaroud for non-ASCII text.


Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c       (original)
+++ DBD-Pg/trunk/dbdimp.c       Sun Jan  6 17:25:17 2008
@@ -15,6 +15,7 @@
 
 #include "Pg.h"
 #include <math.h>
+#include <wchar.h>
 
 /* Force preprocessors to use this variable. Default to something valid yet 
noticeable */
 #ifndef PGLIBVERSION
@@ -1343,7 +1344,7 @@
 
        int placeholder_type; /* Which type we are in: one of 0,1,2,3 
(none,?,$,:) */
 
-       char ch; /* The current character being checked */
+       unsigned char ch; /* The current character being checked */
 
        char quote; /* Current quote or comment character: used only in those 
two blocks */
 
@@ -1407,11 +1408,6 @@
 
        while (1) {
 
-               /* Quick hack, will work on this more later: */
-               if (ch < 0) {
-                       croak("Invalid string - utf-8 problem?");
-               }
-
                /* Are we done processing this string? */
                if (ch < 1) {
                        break;

Reply via email to