<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Re: [Seaside] Encoding question</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Philippe,<BR>
<BR>
Which is where all the other hacks in the Swazoo came about, all worked just fine in until we moved to opentalk recently, but the old code is in the repository we left behind.<BR>
<BR>
Cheers!<BR>
<BR>
-Boris (via BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org &lt;seaside-bounces@lists.squeakfoundation.org&gt;<BR>
To: Seaside - general discussion &lt;seaside@lists.squeakfoundation.org&gt;<BR>
Sent: Tue Jun 03 21:38:53 2008<BR>
Subject: Re: [Seaside] Encoding question<BR>
<BR>
That's quite a hack, I expect it to break if you return any binary<BR>
content (images, pdfs, ...). Second the image encoding won't be utf-8.<BR>
<BR>
Cheers<BR>
Philippe<BR>
<BR>
2008/6/3, Boris Popov &lt;boris@deepcovelabs.com&gt;:<BR>
&gt; Andres,<BR>
&gt;<BR>
&gt;&nbsp; I recall getting that same combo working a while back, here's a starting point for you,<BR>
&gt;<BR>
&gt;&nbsp; SeasidePlatformSupport class&gt;&gt;readWriteStream<BR>
&gt;&nbsp;&nbsp; ^EncodedStream<BR>
&gt;&nbsp;&nbsp;&nbsp; on: (ReadWriteStream on: (ByteArray new: 1000))<BR>
&gt;&nbsp;&nbsp;&nbsp; encodedBy: (StreamEncoder new: #'utf-8').<BR>
&gt;<BR>
&gt;&nbsp; ... but I think I had to make a couple of small changes to Swazoo as well, although I don't have that code handy anymore.<BR>
&gt;<BR>
&gt;&nbsp; -Boris<BR>
&gt;<BR>
&gt;&nbsp; --<BR>
&gt;&nbsp; +1.604.689.0322<BR>
&gt;&nbsp; DeepCove Labs Ltd.<BR>
&gt;&nbsp; 4th floor 595 Howe Street<BR>
&gt;&nbsp; Vancouver, Canada V6C 2T5<BR>
&gt;&nbsp; <A HREF="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A><BR>
&gt;<BR>
&gt;&nbsp; boris@deepcovelabs.com<BR>
&gt;<BR>
&gt;&nbsp; CONFIDENTIALITY NOTICE<BR>
&gt;<BR>
&gt;&nbsp; This email is intended only for the persons named in the message<BR>
&gt;&nbsp; header. Unless otherwise indicated, it contains information that is<BR>
&gt;&nbsp; private and confidential. If you have received it in error, please<BR>
&gt;&nbsp; notify the sender and delete the entire message including any<BR>
&gt;&nbsp; attachments.<BR>
&gt;<BR>
&gt;&nbsp; Thank you.<BR>
&gt;<BR>
&gt;<BR>
&gt;&nbsp; &gt; -----Original Message-----<BR>
&gt;&nbsp; &gt; From: seaside-bounces@lists.squeakfoundation.org [<A HREF="mailto:seaside-">mailto:seaside-</A><BR>
&gt;&nbsp; &gt; bounces@lists.squeakfoundation.org] On Behalf Of Andres Fortier<BR>
&gt;&nbsp; &gt; Sent: Tuesday, June 03, 2008 12:34 PM<BR>
&gt;&nbsp; &gt; To: Seaside - general discussion<BR>
&gt;&nbsp; &gt; Subject: Re: [Seaside] Encoding question<BR>
&gt;&nbsp; &gt;<BR>
&gt;&nbsp; &gt; Hi Sebastian, Philippe:<BR>
&gt;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sorry for the short description: I'm using<BR>
&gt;&nbsp; &gt; seaside in VW<BR>
&gt;&nbsp; &gt; 7.4.1 (actually Swazoo + Seaside). Encoding is UTF-8 in the VW image.<BR>
&gt;&nbsp; &gt; Now, I guess I must be wrong in this, but isn't WAHtmlEncoder supposed<BR>
&gt;&nbsp; &gt; to do the conversion between special characters and html entities? I<BR>
&gt;&nbsp; &gt; found kind of weird the standard implementation of #encode:on: since<BR>
&gt;&nbsp; &gt; it makes you think that this is the purpose of this class. So I guess<BR>
&gt;&nbsp; &gt; I should rephrase my question: what is WAHtmlEncoder supposed to do?<BR>
&gt;&nbsp; &gt; Who should be in charge of translating the html entities? The web server?<BR>
&gt;&nbsp; &gt;<BR>
&gt;&nbsp; &gt; Thanks!<BR>
&gt;&nbsp; &gt; Andrés<BR>
&gt;&nbsp; &gt;<BR>
&gt;&nbsp; &gt; Philippe Marschall escribió:<BR>
&gt;&nbsp; &gt; &gt; Ce n'est pas si facile que ça. Tell us what encoding you have on your<BR>
&gt;&nbsp; &gt; &gt; web page, in your image, your Seasie, Kom, Squeak (assuming you're on<BR>
&gt;&nbsp; &gt; &gt; Squeak) version and we tell you what to do.<BR>
&gt;&nbsp; &gt; &gt;<BR>
&gt;&nbsp; &gt; &gt; And oh, check the class comments of WAKom and WAKomEncoded.<BR>
&gt;&nbsp; &gt; &gt;<BR>
&gt;&nbsp; &gt; &gt; Cheers<BR>
&gt;&nbsp; &gt; &gt; Philippe<BR>
&gt;&nbsp; &gt; &gt;<BR>
&gt;&nbsp; &gt; &gt; 2008/6/3, Sebastian Sastre &lt;ssastre@seaswork.com&gt;:<BR>
&gt;&nbsp; &gt; &gt;&gt; This is a FAQ. Try starting with WAKomEncoded instead of WAKom<BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; Sebastian Sastre<BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; -----Mensaje original-----<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; De: seaside-bounces@lists.squeakfoundation.org<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; [<A HREF="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A>] En nombre<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; de Andres Fortier<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; Enviado el: Martes, 03 de Junio de 2008 15:32<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; Para: Seaside List<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; Asunto: [Seaside] Encoding question<BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; Hi list,<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maybe I'm wrong, but it seems that Seaside is not able<BR>
&gt;&nbsp; &gt; to<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; render accented characters (like 'á,é,í...' etc) and other spacial<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; cases. I've been looking around and ended up in the WAHtmlEncoder<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; class, which redefines #encode:on: for just a few cases, not for all<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; the special character in range 0..255. Am I right here? Is there a<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; standard extension for this?<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt;<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; --<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; Thanks,<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Andrés<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; _______________________________________________<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; seaside mailing list<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; seaside@lists.squeakfoundation.org<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; &gt; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; _______________________________________________<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; seaside mailing list<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; seaside@lists.squeakfoundation.org<BR>
&gt;&nbsp; &gt; &gt;&gt;&nbsp; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt; -----------------------------------------------------------------------<BR>
&gt;&nbsp; &gt; -<BR>
&gt;&nbsp; &gt; &gt;&gt;<BR>
&gt;&nbsp; &gt; &gt;&gt; _______________________________________________<BR>
&gt;&nbsp; &gt; &gt;&gt; seaside mailing list<BR>
&gt;&nbsp; &gt; &gt;&gt; seaside@lists.squeakfoundation.org<BR>
&gt;&nbsp; &gt; &gt;&gt; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt;&nbsp; &gt; _______________________________________________<BR>
&gt;&nbsp; &gt; seaside mailing list<BR>
&gt;&nbsp; &gt; seaside@lists.squeakfoundation.org<BR>
&gt;&nbsp; &gt; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt;&nbsp; _______________________________________________<BR>
&gt;&nbsp; seaside mailing list<BR>
&gt;&nbsp; seaside@lists.squeakfoundation.org<BR>
&gt;&nbsp; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt;<BR>
</FONT>
</P>

</BODY>
</HTML>