Re: Problems with Unicode chars and SXML

"Alessandro Colomba" <[email protected]> Thu, 20 Mar 2008 01:00:31 -0400
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
Indeed the problem derives from my using pretty-print for emitting
attribute values in the siscweb/html module -- in the markup.scm file
to be precise. I will push a fix to both fix and dev branches of CVS
within a day.

In the meantime, you might be glad to hear that the siscweb/xhtml does
not suffer from the same problem.

Thank you for reporting this bug. The test case hit the spot!
___
Alessandro

On Wed, Mar 19, 2008 at 9:28 PM, Gerardo Horvilleur <[email protected]> wrote:
> Here is a simple testcase:
>
>  (require-library 'siscweb/html)
>
>  (import siscweb/html)
>
>  (define message "M\u00e9xico")
>
>  (define (encoding-test request)
>   (set! request #f)
>   (send-html/back '((Content-type
>                      "text/html; charset=ISO-8859-1"))
>    `(html
>      (body
>       (p ,message)
>       (form
>        (input (@ (type text) (value ,message))))))))
>
>  (publish "/test" 'encoding-test)
>
>
>  The message is displayed correctly in (p ,message), but it is
>  displayed wrong in (value ,message).
>
>
>
>  On Wed, Mar 19, 2008 at 7:20 PM, Gerardo Horvilleur <[email protected]> wrote:
>  > I'll try to make a small test case I can send you as soon as possible.
>  >  In the meantime, the problem doesn't seem to be the encoding. It is
>  >  more something like if the value was displayed using something like
>  >  (write message) instead of (display message).
>  >
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 7:12 PM, Alessandro Colomba <[email protected]> wrote:
>  >  > Could you please post or send me a test case? A value roundtrip should
>  >  >  not change the encoding.
>  >  >  ___
>  >  >  Alessandro
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >  On Tue, Mar 18, 2008 at 10:53 PM, Gerardo Horvilleur <[email protected]> wrote:
>  >  >  > Thanks. Setting the charset in the Content-type header works for the
>  >  >  >  most of the text, but not for the content of text inputs. What I have
>  >  >  >  is something like this:
>  >  >  >
>  >  >  >  (input (@ (type text) (name msg)  (value ,message)))
>  >  >  >
>  >  >  >  Initially the 'message' variable contains an empty string, When the
>  >  >  >  user makes a mistake in filling out the form I redisplay the form with
>  >  >  >  the text they already captured so they just have to fix the mistake
>  >  >  >  instead of filling all the form again. When the user types something
>  >  >  >  with accents in the msg field it then gets redisplayed as \u00e9, even
>  >  >  >  when I set a charset in the Content-type header.
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >  On Tue, Mar 18, 2008 at 8:25 PM, Alessandro Colomba <[email protected]> wrote:
>  >  >  >  > SISCweb accepts an associative list of headers as the first, optional
>  >  >  >  >  argument to the send-*/* procedures. [*] Setting the Content-Type
>  >  >  >  >  appropriately [**] should do the trick.
>  >  >  >  >  ___
>  >  >  >  >  Alessandro
>  >  >  >  >
>  >  >  >  >  [*] See http://siscweb.sourceforge.net/swm/ch03.html#send-html for example
>  >  >  >  >  [**] See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
>  >  >  >  >
>  >  >  >  >
>  >  >  >  >
>  >  >  >  >  On Tue, Mar 18, 2008 at 1:09 PM, Gerardo Horvilleur <[email protected]> wrote:
>  >  >  >  >  > When I insert some string in SXML, for instance (p ,text), and the
>  >  >  >  >  >  variable "text" contains a character with an accent , for instance รณ
>  >  >  >  >  >  which is #\u00f3, I get in my generated html the string \u00f3. Has
>  >  >  >  >  >  anybody else had this problem with SISCweb? How did you solve it?
>  >  >  >  >  >
>  >  >  >  >  >  --
>  >  >  >  >  >  Gerardo Horvilleur
>  >  >  >  >  >  [email protected]
>  >  >  >  >  >  5813-0830
>  >  >  >  >  >
>  >  >  >  >  >  -------------------------------------------------------------------------
>  >  >  >  >  >  This SF.net email is sponsored by: Microsoft
>  >  >  >  >  >  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  >  >  >  >  >  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  >  >  >  >  >  _______________________________________________
>  >  >  >  >  >  Sisc-users mailing list
>  >  >  >  >  >  [email protected]
>  >  >  >  >  >  https://lists.sourceforge.net/lists/listinfo/sisc-users
>  >  >  >  >  >
>  >  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >  --
>  >  >  >
>  >  >  >
>  >  >  > Gerardo Horvilleur
>  >  >  >  [email protected]
>  >  >  >  5813-0830
>  >  >  >
>  >  >
>  >
>  >
>  >
>  >  --
>  >
>  >
>  > Gerardo Horvilleur
>  >  [email protected]
>  >  5813-0830
>  >
>
>
>
>  --
>
>
> Gerardo Horvilleur
>  [email protected]
>  5813-0830
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/