Commit 83bcb58d authored by Peter Van Eynde's avatar Peter Van Eynde

Modified sbcl unicode support, works for me.

Moved requires into asdf package, otherwise we get asdf package problems, unknown if it works with other lisps
parent 6b17efb0
cl-pg (20050717-2) UNRELEASED; urgency=low
* token new version
* Better sbcl unicode support
* Improved asdf compatibility
-- Peter Van Eynde <pvaneynd@debian.org> Tue, 18 Oct 2005 14:52:23 +0200
cl-pg (20050717-1) unstable; urgency=low
* token new darcs version
......
......@@ -16,6 +16,12 @@
:name "Socket-level PostgreSQL interface"
:author "Eric Marsden"
:version "0.22"
:depends-on (
#+allegro :socket
#+lispworks "comm"
#+cormanlisp :sockets
#+sbcl :sb-bsd-sockets
#+(and mcl (not openmcl)) "OPENTRANSPORT")
:components ((:file "md5")
(:file "defpackage" :depends-on ("md5"))
(:pg-component "sysdep" :depends-on ("defpackage" "md5"))
......
......@@ -7,13 +7,6 @@
(in-package :postgresql)
(eval-when (:compile-toplevel :load-toplevel :execute)
#+allegro (require :socket)
#+lispworks (require "comm")
#+cormanlisp (require :sockets)
#+sbcl (require :sb-bsd-sockets)
#+(and mcl (not openmcl)) (require "OPENTRANSPORT"))
(defmacro %sysdep (desc &rest forms)
(when (null forms)
......@@ -336,7 +329,8 @@
#+(and allegro ics)
(excl:octets-to-string bytes :external-format encoding)
#+(and :sbcl :sb-unicode)
(sb-ext:octets-to-string bytes :external-format encoding)
(sb-ext:octets-to-string bytes :external-format
(sbcl-ext-form-from-client-encoding encoding))
;; for implementations that have no support for character
;; encoding, we assume that the encoding is an octet-for-octet
;; encoding, and convert directly
......
......@@ -274,18 +274,10 @@ but will still return them"
(when (< length 0)
(error "length cannot be negative. is: ~S"
length))
(let ((result (make-array length
:element-type 'base-char)))
(with-slots (data position)
packet
(loop :for i :from 0 :below length
:do
(setf (elt result i)
(code-char
(the (unsigned-byte 8)
(elt data (+ i position))))))
(incf position length)
result))))
(let* ((octects (read-octets-from-packet packet
length))
(string (convert-string-from-bytes octects)))
string)))
(defmethod read-octets-from-packet ((packet pg-packet) (length integer))
(let ((result (make-array length :element-type '(unsigned-byte 8))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment