[Q] WAListener and WAFileLibrary problem

Niko Schwarz niko.schwarz at googlemail.com
Thu Jan 3 14:46:37 UTC 2008


It appears that you'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't
want complete texts but only the Euro currency sign. And 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.

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) does not work properly with the Euro sign.

For example, when you print this:

 'Grüß Gott!' asUtf8

it looks awful, because the new string doesn't know it's UTF-8.

So, it appears that for Seaside to cope with Korean well, you might have to
change more than Seaside only.

niko


2008/1/3, chunsj at embian.com <chunsj at embian.com>:
>
> Hi,
>
> I've managed to find and modify WAListenerEncoded so that it can process
> multibyte language - I've only tested it with Korean as UTF-8. During
> testing
> I found following problem.
>
> When I use WAListener/WAListenerEncoded I cannot get FileLibrary
> registered
> image files correctly. I can get CSS file or script file correctly, but I
> cannot get
> image files.
>
> It seems that when I use WAListener, the server sent the image file of the
> size
> of 16135 byte, but original file size is 10819 byte, and this might be the
> source
> of the problem. I cannot open wrong sized file even though I cut the size
> of the
> file to the original one.
>
> Can anyone help me? Thanks in advance.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080103/f38161f9/attachment.htm


More information about the Squeak-dev mailing list