[Seaside-dev] Encoding issues? Entering 'euro sign' into a text input breaks render

John Thornborrow john at pinesoft.co.uk
Tue Oct 16 13:26:50 UTC 2007


I orignally had the Package Universe version of KomHttpServer (6.2) and
received the same results - the test does not pass.

The same is also true for many other characters, unicode 2000+ also
cause the test and Seaside to fail rendering.

This is proving to be havoc for my clients who are copying from Word
documents made by publishers who make use of left/right-side quotes,
primes etc. in their documents and wish to publish them on the web in
HTML form. I agree, this is not your problem, it is mine, but surely you
must be able to see that it is something to consider, rather than just
sticking to the still-not-yet-fully-supported-by-browsers (X)HTML standards?

Regards,
John

Philippe Marschall wrote:
> 2007/10/16, John Thornborrow <john at pinesoft.co.uk>:
>> The /seaside/tests/alltests for encoding doesn't pass - it fails with:
>>
>> "Internal Error
>>
>> MessageNotUnderstood: UndefinedObject>>asCharacter
>>
>> RWBinaryOrTextStream>>nextPut:
>> WAHtmlEncoder(WAEncoder)>>nextPutAll:
>> ByteString(String)>>encodeOn:
>> WAHtmlStreamDocument>>print:
>> WARenderCanvas(WAHtmlCanvas)>>text:
>> ByteString(String)>>renderOn:
>> [] in WAGenericTag(WATagBrush)>>with: {[self before. anObject renderOn:
>> canvas. self after]}
>>
>> etc.."
>>
>> I've got the lastest KomHttpServer from squeaksource.com and I'm not
>> sure what version WAKom* is - I thought this was part of the seaside
>> package?
> 
> No, we only support the official one on SqueakMap and the one from
> netstyle.ch which comes with the SeasideInstaller.
> 
>> I've made a work around, and that is to include:
> 
> Use one of the supported KomHttpServers. They should pass the
> /seaside/tests/alltests at least in ecoding mode.
> 
> If you use an other version of Kom we don't care. We're sorry but
> already supporting these is enough of a mess.
> 
> Cheers
> Philippe
> 
>> aCharacter = (Character value: 1069555884) ifTrue: [^ aStream
>> nextPutAll: '&euro;' ] .
>>
>> to the list of characters in WAHtmlEncoder class>>encode:on: but given
>> the ourcome of the last time I made changes to this method, it is not
>> the preferred/accepted solution.
>>
>> Regards,
>> John
>>
>> Philippe Marschall wrote:
>>> 2007/10/16, John Thornborrow <john at pinesoft.co.uk>:
>>>> Hello all,
>>>>
>>>> I've discussed this briefly before on the list, following my
>>>> contribution regarding encoding more characters than what the (X)HTML
>>>> spec defines - but did not have an example at the time.
>>>>
>>>> However, I have just stumbled upon a significant problem which I wanted
>>>> to raise as an issue to the dev-list; that is that Seasides rendering
>>>> does not like the Euro-symbol.
>>>>
>>>> The simplest example:
>>>>
>>>> renderContentOn: html
>>>>   html form with: [
>>>>     html textInput callback: [ :x | text := x ].
>>>>     html paragraph with: text.
>>>>     html submitButton
>>>>   ]
>>>>
>>>> On the form, enter a Euro symbol (ALT+0128 on Windows) in the text box
>>>> and submit.
>>>>
>>>> After submitting, it is very obvious that there is a problem (the screen
>>>> will be filled with characters that cannot be rendered.)
>>>>
>>>> Just incase it is something I am doing wrong, I have attached a file-out
>>>> of the example component. If anyone could confirm this is a problem/bug
>>>> then I shall submit a bug-report, providing it is not already reported :).
>>>>
>>>> However, I've also noticed that the WAEncoder>>initializeBMP does not
>>>> reach the range necessary to encode the euro (Character value: 1069555884)
>>>>
>>>> P.S. Tested with the latest version available in Monticello as of today,
>>>> and this is on Squeak 32bit 3.10 vm on Windows platform.
>>> What combination of WAKom* and KomHttpServer do you run?
>>> WAEncodingTest under /seaside/test/alltests should test this exact
>>> scenario and run.
>>>
>>> Cheers
>>> Philippe
>>>
>>>> Regards,
>>>> John
>>>>
>>>>
>>>> Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA
>>>>
>>>>
>>>>
>>>> This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
>>>>
>>>>
>>>> 'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 16 October 2007 at 11:50:34 am'!
>>>> WAComponent subclass: #BrokenEuro
>>>>         instanceVariableNames: 'text'
>>>>         classVariableNames: ''
>>>>         poolDictionaries: ''
>>>>         category: 'MyStuff'!
>>>>
>>>> !BrokenEuro methodsFor: 'rendering' stamp: 'jmt 10/16/2007 10:58'!
>>>> renderContentOn: html
>>>>         html form with: [
>>>>                 html textInput callback: [ :x | text := x ].
>>>>                 html paragraph with: text.
>>>>                 html submitButton
>>>>         ]! !
>>>>
>>>> "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
>>>>
>>>> BrokenEuro class
>>>>         instanceVariableNames: ''!
>>>>
>>>> !BrokenEuro class methodsFor: 'as yet unclassified' stamp: 'jmt 10/16/2007 11:49'!
>>>> canBeRoot
>>>>         ^true! !
>>>>
>>>> _______________________________________________
>>>> seaside-dev mailing list
>>>> seaside-dev at lists.squeakfoundation.org
>>>> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>>>>
>>>>
>>> _______________________________________________
>>> seaside-dev mailing list
>>> seaside-dev at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>>>
>>>
>>>
>>>
>> _______________________________________________
>> seaside-dev mailing list
>> seaside-dev at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> 
> 
>  
> 


More information about the seaside-dev mailing list