Re: Problems with Unicode chars and SXML
"Gerardo Horvilleur" <[email protected]> Wed, 19 Mar 2008 19:28:24 -0600
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
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/