[Q] WAListener and WAFileLibrary problem

chunsj at embian.com chunsj at embian.com
Thu Jan 3 21:47:31 UTC 2008

For me, all the encoding related part does work well. My problem is that -
as I said in my previous mail - now binary image file registered at WAFileLibrary,
could not be sent correctly. During reading your message I found one possibility
that can corrupt image file. I'll investigate that part.

Thank you.

My application does use UTF-8 for both input/output.

----- Original Message -----
   From: Niko Schwarz <niko.schwarz at googlemail.com>
   To: chunsj at embian.com, The general-purpose Squeak developers list <squeak-dev at lists.squeakfoundation.org>
   Sent: 08-01-03 23:46:37
   Subject: Re: [Q] WAListener and WAFileLibrary problem

  <div>It appears that you&#39;re trying to convince Seaside to send UTF-8, right? I had the same problem during my time working with it. Then again, I didn&#39;t want complete texts but only the Euro currency sign. And&nbsp;and what I did was: I left my fingers off of WAListener and all those. Instead, I assembled the three bytes needed for a Euro sign myself by hand into a normal String and lo and behold, it looked right in the browser. 
<div>For Korean your approach is probably better, I guess. Mine was unsatisfying, too, because it assumed incoming text to be encoded in latin-15, but emitted texts in utf-8. Really not satisfying. I thought, the right approach might be to enhance the String class with an additional field for the encoding and give it some methods to transcode between them. By the way: the method asUtf8 (or something like that)&nbsp;does not work properly with the Euro sign.
<div>For example, when you print this: </div>
<div>&nbsp;&#39;Gr廻 Gott!&#39; asUtf8</div>
<div>it looks awful, because the new string doesn&#39;t know it&#39;s UTF-8.</div>
<div>So, it appears that for Seaside to cope with Korean well, you might have to change more than Seaside only. </div>
<div><span class="gmail_quote">2008/1/3, <a href="mailto:chunsj at embian.com">chunsj at embian.com</a> &lt;<a href="mailto:chunsj at embian.com">chunsj at embian.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>I&#39;ve managed to find and modify WAListenerEncoded so that it can process<br>multibyte language - I&#39;ve only tested it with Korean as UTF-8. During testing
<br>I found following problem.<br><br>When I use WAListener/WAListenerEncoded I cannot get FileLibrary registered<br>image files correctly. I can get CSS file or script file correctly, but I cannot get<br>image files.<br>
<br>It seems that when I use WAListener, the server sent the image file of the size<br>of 16135 byte, but original file size is 10819 byte, and this might be the source<br>of the problem. I cannot open wrong sized file even though I cut the size of the
<br>file to the original one.<br><br>Can anyone help me? Thanks in advance.<br><br><br></blockquote></div><br>

More information about the Squeak-dev mailing list