The only thing I can think of is to check SB-IMPL::*DEFAULT-EXTERNAL-FORMAT* -- it should be :UTF-8.
Failing that, try asking on the CLSQL list. -- Scott On Tue, Jun 25, 2013 at 4:08 PM, zhiguolv <[email protected]> wrote: > hi, I am using clsql-sys to create a chinese field table into mysql > database. when I load my package and use the command clsql-sys: create- > view-from-class, errors occured, my operation step mainly is the following: > > (1) --------Part of the student model file content is as follows: > ;;; Model > (clsql:def-view-class student () > ((id :accessor stu-id > :db-kind :key > :db-constraints (:not-null :unique) > :type integer) > (name :initarg :name > :accessor stu-name > :db-constraints :not-null > :type string) > (性别 :initarg :性别 > :accessor stu-sex > :type string) > )) > in this file a chinese field named 性别 is defined. > (2)-------- I use quickload to load the package named myweb in slime+sbcl, > the commands are as follows: > CL-USER> (ql:quickload "myweb") > To load "myweb": > Load 1 ASDF system: > myweb > ; Loading "myweb" > ....... > ("myweb") > CL-USER> (weblocks:start-weblocks) > #<WEBLOCKS:WEBLOCKS-ACCEPTOR (host *, port 8080)> > (#<MYWEB::MYWEB {262A2FC9}>) > CL-USER> (in-package myweb) > #<PACKAGE "MYWEB"> > MYWEB> (clsql-sys:create-view-from-class 'student :database *default- > store*) > compiling file "e:/Lisp/sbcl/site/clsql/uffi/clsql-uffi-loader.lisp" > (written 19 DEC 2012 10:08:44 AM): > ; compiling (IN-PACKAGE #:CLSQL-UFFI) > ; compiling (DEFUN FIND-AND-LOAD-FOREIGN-LIBRARY ...) > ; compiling (DEFVAR *CLSQL-UFFI-LIBRARY-FILENAMES* ...) > ; compiling (DEFVAR *CLSQL-UFFI-SUPPORTING-LIBRARIES* ...) > ; compiling (DEFVAR *UFFI-LIBRARY-LOADED* ...) > ; compiling (DEFUN LOAD-UFFI-FOREIGN-LIBRARY ...) > ; compiling (LOAD-UFFI-FOREIGN-LIBRARY) > ; e:/Lisp/sbcl/site/clsql/uffi/ASDF-TMP-clsql-uffi-loader.fasl written > ; compilation finished in 0:00:00.312 > ; compiling file "e:/Lisp/sbcl/site/clsql/uffi/clsql-uffi.lisp" (written > 19 DEC 2012 10:08:44 AM): > ; compiling (IN-PACKAGE #:CLSQL-UFFI) > ; compiling (DEFUN CANONICALIZE-TYPE-LIST ...) > ; compiling (DEF-FUNCTION "atoi" ...) > ; compiling (DEF-FUNCTION ("strtoul" C-STRTOUL) ...) > ; compiling (DEF-FUNCTION "atol" ...) > ; compiling (DEF-FUNCTION "atof" ...) > ; compiling (DEF-FUNCTION "atol64" ...) > ; compiling (DEF-CONSTANT +2^32+ ...) > ; compiling (DEF-CONSTANT +2^64+ ...) > ; compiling (DEF-CONSTANT +2^32-1+ ...) > ; compiling (DEFMACRO MAKE-64-BIT-INTEGER ...) > ; compiling (DEFMACRO MAKE-128-BIT-INTEGER ...) > ; compiling (DEFMACRO SPLIT-64-BIT-INTEGER ...) > ; compiling (DEF-TYPE CHAR-PTR-DEF ...) > ; compiling (DEFUN STRTOUL ...) > ; compiling (DEFUN CONVERT-RAW-FIELD ...) > ; e:/Lisp/sbcl/site/clsql/uffi/ASDF-TMP-clsql-uffi.fasl written > ; compilation finished in 0:00:01.000 > > (3) ----------the following errors occured, the detail of which is: > c-string decoding error (:external-format :UTF-8): > the octet sequence 1 cannot be decoded. > [Condition of type SB-INT:C-STRING-DECODING-ERROR] > Restarts: > > 0: [RETRY] Retry SLIME REPL evaluation request. > 1: [*ABORT] Return to SLIME's top level. > > 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" > RUNNING {24FC7F49}>) > Backtrace: > 0: (SB-INT:C-STRING-DECODING-ERROR :UTF-8 1) > 1: (SB-IMPL::READ-FROM-C-STRING/UTF-8 #.(SB-SYS:INT-SAP #X02E64147) > CHARACTER) > 2: ((SB-PCL::FAST-METHOD CLSQL-SYS:DATABASE-EXECUTE-COMMAND (T CLSQL- > MYSQL:MYSQL-DATABASE)) ..) > 3: ((SB-PCL::EMF CLSQL-SYS:DATABASE-EXECUTE-COMMAND) ..) > 4: ((SB-PCL::EMF CLSQL-SYS:DATABASE-EXECUTE-COMMAND) ..) > 5: ((SB-PCL::FAST-METHOD CLSQL-SYS:EXECUTE-COMMAND (STRING)) ..) > 6: ((SB-PCL::FAST-METHOD CLSQL-SYS:EXECUTE-COMMAND (CLSQL-SYS::%SQL- > EXPRESSION)) ..) > 7: ((SB-PCL::FAST-METHOD CLSQL-SYS::%INSTALL-CLASS (CLSQL-SYS::STANDARD- > DB-CLASS T)) ..) > 8: (CLSQL-SYS:CREATE-VIEW-FROM-CLASS STUDENT :DATABASE #<CLSQL-SYS:FLUID- > > DATABASE localhost/supportdb/admin OPEN {2646F979}> :TRANSACTIONS T) > 9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CLSQL-SYS:CREATE-VIEW-FROM- > CLASS 'STUDENT :DATABASE *DEFAULT-STORE*) #<NULL-LEXENV>) > 10: (EVAL (CLSQL-SYS:CREATE-VIEW-FROM-CLASS 'STUDENT :DATABASE *DEFAULT- > STORE*)) > 11: (SWANK::EVAL-REGION "(clsql-sys:create-view-from- > class 'student :database *default-store*)\n") > Locals: > SB-DEBUG::ARG-0 = "(clsql-sys:create-view-from- > class 'student :database *default-store*)\n" > > 12: ((LAMBDA () :IN SWANK::REPL-EVAL)) > 13: (SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA # :IN SWANK::REPL-EVAL) > > {266CF51D}>) > > 14: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation > > request." #<CLOSURE (LAMBDA # :IN SWANK::REPL-EVAL) {266CF4AD}>) > > 15: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA # :IN > > SWANK::REPL-EVAL) {266CF495}>) > 16: (SWANK::REPL-EVAL "(clsql-sys:create-view-from- > class 'student :database *default-store*)\n") > 17: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(clsql-sys:create- > > view-from-class 'student :database *default-store*)\n") #<NULL-LEXENV>) > 18: (EVAL (SWANK:LISTENER-EVAL "(clsql-sys:create-view-from- > class 'student :database *default-store*)\n")) > 19: (SWANK:EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(clsql-sys:create-view- > from-class 'student :database *default-store*)\n") "MYWEB" 10) > > 20: (SWANK::PROCESS-REQUESTS NIL) > 21: ((LAMBDA () :IN SWANK::HANDLE-REQUESTS)) > 22: ((LAMBDA () :IN SWANK::HANDLE-REQUESTS)) > 23: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER- > > HOOK> #<CLOSURE (LAMBDA # :IN SWANK::HANDLE-REQUESTS) {24FD00CD}>) > 24: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "e:/Lisp/emacs- > 23.3/site-lisp/slime/swank-sbcl.lisp") ..) > 25: (SWANK::CALL-WITH-BINDINGS ..) > 26: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {248F0A01}> > > NIL) > 27: ((FLET #:WITHOUT-INTERRUPTS-BODY-239701 :IN SB-THREAD:MAKE-THREAD)) > 28: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD:MAKE-THREAD)) > 29: ((FLET #:WITHOUT-INTERRUPTS-BODY-99850 :IN SB-THREAD::CALL-WITH- > MUTEX)) > 30: (SB-THREAD::CALL-WITH-MUTEX ..) > 31: (SB-THREAD::INITIAL-THREAD-FUNCTION) > 32: ("foreign function: call_into_lisp {426ECD}") > > > I think this is caused by the chinese field introduced in def-view-class > student() > Could anyone give me some help? I really need your help. > > -- > You received this message because you are subscribed to the Google Groups > "weblocks" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/weblocks. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "weblocks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/weblocks. For more options, visit https://groups.google.com/groups/opt_out.
