[Seaside] Accented characters

Philippe Marschall philippe.marschall at gmail.com
Mon Jul 24 07:05:51 UTC 2006


Yes, this should work as long as you tell the truth about the
content-encoding. What does telling the truth mean? It means what you
tell the content-encoding is and what it actually is must match.

So what are your options

external: utf-8
internel: utf-8 (ByteString)
kom-adapter: WAKom
This is probably the easiest and most performant, remember to convert
your literals with non-ASCII characters to utf-8 (#squeakToIso
#isoToUtf8). The disadvantage is that you can't directly index into
such a string or ask for its size (besides beeing empty).
Concatenation however works as long as you concatenate only utf-8

external: latin-1
internal: latin-1 (ByteString)
kom-adapter: WAKom
This also easy to set up. You need to make sure the content-type of
WAResponse gets initialized to iso-8859-1. The easiest way is probably
a custom session subclass that overrides #contentType. Remember to
convert your literals with non-ASCII characters to latin-1. This is
not needed for >= 3.8 (have a look at #squeakToIso to be sure, in this
case you also don't need to send #squeakToIso in the case above).
Performance should be the same as above. This approach lets you
directly index into strings and ask for their size. However, now that
we have Unicode, Latin-1 is a legacy encoding.

external: utf-8
internal: unicode (WideString)
kom-adapter: WAKomEncoded
This is probably the most sophisticated solution and requires >= 3.8.
I don't know wheter you need to convert you literals but there's any
easy way to find out ;). There were once said to be performance issues
with this approach. I don't know wheter this holds still true. This
approach also lets you directly index into strings and ask for their
In gerenal this could use any external encoding supported by squeak
(eg. utf-16) but WAKomEncoded would need to be adapted.

The only possible show stopper that comes in my mind is:
But is affects only outdated 3.9 versions.


2006/7/22, Damien Cassou <damien.cassou at laposte.net>:
> Hi,
> I would like to enter accented characters in textarea and textinput. Is
> this known to be working on 2.6b1 ? I've tried with WAKom and
> WAKomEncoded without success. How can I do this please ?
> Thank you very much
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the Seaside mailing list