[pg-cvs] CVS update: pg/v3-protocol.lisp

Eric Marsden emarsden at common-lisp.net
Thu Apr 22 17:00:12 UTC 2004

Update of /project/pg/cvsroot/pg
In directory common-lisp.net:/tmp/cvs-serv6507

Modified Files:
Log Message:

Comment-only patch: mark the places in the v3-protocol code where charset
encoding problems will have to be addressed. 

It's probably not worth going through the v2-protocol code to fix these
issues, since it has too many places where READ-CSTRING is confused with

Date: Thu Apr 22 13:00:12 2004
Author: emarsden

Index: pg/v3-protocol.lisp
diff -u pg/v3-protocol.lisp:1.10 pg/v3-protocol.lisp:1.11
--- pg/v3-protocol.lisp:1.10	Wed Apr 21 15:27:46 2004
+++ pg/v3-protocol.lisp	Thu Apr 22 13:00:12 2004
@@ -233,6 +233,7 @@
              (result (unless (= end position)
                        (make-array (- end position)
                                    :element-type 'base-char))))
+        ;; FIXME need to handle charset encoding issues here
         (when result
           (loop :for i :from position :below end
                 :for j :from 0
@@ -243,6 +244,9 @@
           (setf position (1+ end))
+;; FIXME need to check all callers of this function to distinguish
+;; between uses that expect charset encoding to be handled, and those
+;; that really want READ-OCTET-ARRAY-FROM-PACKET
 (defgeneric read-string-from-packet (packet length)
    "Reads an array of LENGTH bytes from the packet")
@@ -316,6 +320,9 @@
              (setf (elt data (+ 2 position)) (ldb (byte 8 8) value))
              (setf (elt data (+ 3 position)) (ldb (byte 8 0) value))
              (incf position 4))
+            ;; FIXME need to deal with text encoding issues here:
+            ;; transform from the Lisp string representation to the
+            ;; encoding selected by *PG-CLIENT-ENCODING*. 
              (check-type value string)

More information about the Pg-cvs mailing list