Hello list,
I'm trying to output some cyrillic letters on the web page like this:
(setf *hunchentoot-default-external-format* (flex:make-external-format :utf-8 :eol-style :lf))
(defun main-page () (setf (content-type) "text/html; charset=utf-8") (with-html (:html (:head (:title "Test page")) (:body (:h2 "Main page") (:p "Русский тест") ; Cyrillic letters - "Russian test" ))))
but the resulted page is empty. The lisp file itself in utf-8 coding system. Am I missing something?
My system is Ubuntu 2.6.17, sbcl 1.0.3.38, hunchentoot 0.7.2
Thanks a lot,
Victor Kryukov http://antlook.com
On 3/17/07, Victor Kryukov victor.kryukov@gmail.com wrote:
Hello list,
I'm trying to output some cyrillic letters on the web page like this:
(setf *hunchentoot-default-external-format* (flex:make-external-format :utf-8 :eol-style :lf))
(defun main-page () (setf (content-type) "text/html; charset=utf-8") (with-html (:html (:head (:title "Test page")) (:body (:h2 "Main page") (:p "Русский тест") ; Cyrillic letters - "Russian test" ))))
but the resulted page is empty. The lisp file itself in utf-8 coding system. Am I missing something?
My system is Ubuntu 2.6.17, sbcl 1.0.3.38, hunchentoot 0.7.2
Thanks a lot,
Victor Kryukov http://antlook.com
tbnl-devel site list tbnl-devel@common-lisp.net
I think, though I'm not sure, that you should be using the with-html-output-to-string macro; it may be that at the moment it's just printing it to standard output (whereas it should be returning the page as a string). You could try something like (defun my-page () "Put some unicode characters here") to see if it's an issue with your hunchentoot, though. Rob
Victor Kryukov wrote:
I'm trying to output some cyrillic letters
Your example, slightly modified, works fine on my system*
I say slightly modified as I don't know where to find the with-html macro you used. Here's what I did:
(asdf:operate 'asdf:load-op :hunchentoot) (asdf:operate 'asdf:load-op :cl-who)
(defpackage :test (:use :cl :cl-who :hunchentoot)) (in-package :test)
(setf *default-content-type* "text/html; charset=utf-8") (setf *hunchentoot-default-external-format* (flex:make-external-format :utf-8 :eol-style :lf)) (setf *dispatch-table* (list #'dispatch-easy-handlers))
(define-easy-handler (home :uri "/") () (with-html-output (*standard-output* nil) (:html (:head (:title "Test page")) (:body (:h2 "Main page") (:p "Русский тест")))))
HTH, Tobia
* Debian Sid, SBCL 1.0, Hunchentoot 0.7.2, CL-WHO 0.6.2, Opera 9.10
On Mar 17, 2007, at 1:13 PM, Tobia wrote:
Victor Kryukov wrote:
I'm trying to output some cyrillic letters
Your example, slightly modified, works fine on my system*
I say slightly modified as I don't know where to find the with-html macro you used. Here's what I did:
(asdf:operate 'asdf:load-op :hunchentoot) (asdf:operate 'asdf:load-op :cl-who)
(defpackage :test (:use :cl :cl-who :hunchentoot)) (in-package :test)
(setf *default-content-type* "text/html; charset=utf-8")
Ah! Here it is! I forgot to set *default-content-type*! Thanks a lot Tobia!!
Victor Kryukov http://antlook.com
Hello list,
I've got the following strange error message while running Hunchentoot on my linux box:
* WARNING: Strange result... message type 0x54 arrived from server while idle message type 0x43 arrived from server while idle message type 0x5a arrived from server while idle
debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "hunchentoot-worker-14" {C0FCAF1}>: The variable *REPLY* is unbound.
Anybody has any idea where should I look for the problem? I'm using SBCL 1.0.3.38 and Hunchentoot 0.7.2 on linux.
Best Regards,
Victor Kryukov http://antlook.com
Forgot to mention: I'm running Hunchentoot under mod_lisp2 and Apache2.0. I also pre-compiled core with Hunchentoot, CL-WHO, CL- PPCRE and CLSQL to shorten the startup time - not sure if it's related or not.
Best,
Victor Kryukov http://antlook.com
On Mar 23, 2007, at 7:40 PM, Victor Kryukov wrote:
Hello list,
I've got the following strange error message while running Hunchentoot on my linux box:
- WARNING: Strange result...
message type 0x54 arrived from server while idle message type 0x43 arrived from server while idle message type 0x5a arrived from server while idle
debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "hunchentoot-worker-14" {C0FCAF1}>: The variable *REPLY* is unbound.
Anybody has any idea where should I look for the problem? I'm using SBCL 1.0.3.38 and Hunchentoot 0.7.2 on linux.
Best Regards,
Victor Kryukov http://antlook.com
On Fri, 23 Mar 2007 19:40:33 -0500, Victor Kryukov victor.kryukov@gmail.com wrote:
I've got the following strange error message while running Hunchentoot on my linux box:
- WARNING: Strange result...
message type 0x54 arrived from server while idle message type 0x43 arrived from server while idle message type 0x5a arrived from server while idle
debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "hunchentoot-worker-14" {C0FCAF1}>: The variable *REPLY* is unbound.
Anybody has any idea where should I look for the problem? I'm using SBCL 1.0.3.38 and Hunchentoot 0.7.2 on linux.
The "message type ..." warning comes from PostgreSQL. My /guess/ is that you're somehow screwing up by using the same resources to talk to the database from different threads. Or maybe having CLSQL's FFI code in your saved image is the culprit...
Hello Edi,
thanks a lot - both of your suggestions seem probable, I just haven't thought about CLSQL/Postgresql here.
Best regards,
Victor Kryukov http://antlook.com
On Mar 23, 2007, at 7:56 PM, Edi Weitz wrote:
On Fri, 23 Mar 2007 19:40:33 -0500, Victor Kryukov victor.kryukov@gmail.com wrote:
I've got the following strange error message while running Hunchentoot on my linux box:
- WARNING: Strange result...
message type 0x54 arrived from server while idle message type 0x43 arrived from server while idle message type 0x5a arrived from server while idle
debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "hunchentoot-worker-14" {C0FCAF1}>: The variable *REPLY* is unbound.
Anybody has any idea where should I look for the problem? I'm using SBCL 1.0.3.38 and Hunchentoot 0.7.2 on linux.
The "message type ..." warning comes from PostgreSQL. My /guess/ is that you're somehow screwing up by using the same resources to talk to the database from different threads. Or maybe having CLSQL's FFI code in your saved image is the culprit... _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel