[Seaside] Re: TableReport slow down

Hilaire hilaire at drgeo.eu
Fri Jan 1 16:19:41 UTC 2016


Thanks for the tips.

I naively try this:

printOn:
    aStream << (amount asScaledDecimal: 2) greaseString
    << ' ' << (ByteArray with: 16rE2 with: 16r82 with: 16rAC) asString


But somehow I must be missing something because it does not work as
expected.
I got garbage currency :) 514.25 €

Hilaire


Le 01/01/2016 12:54, Bob Arning a écrit :
> What worked for me once upon a time was to convert the euro character
> to a series of utf-8 bytes.
>
> http://www.fileformat.info/info/unicode/char/20aC/index.htm
>
> so, for euro-currency sign U+20A0
> <http://www.fileformat.info/info/unicode/char/20a0/index.htm> you
> would need a 3-byte string whose characters in hex were: 0xE2 0x82 0xAC
>
> In squeak, I used this
>
> utf8ForCodePoint: cp
>
> "===
> SEUtils utf8ForCodePoint: 16r2190
>    
> 16r2190 radix: 2 '10000110010000'
>
> 16    U+FFFF    1110xxxx    10xxxxxx    10xxxxxx
> ==="
>
>     | bits answer |
>    
>     bits := (cp radix: 2) padded: #left to: 16 with: $0.
>     answer := String new.
>     {
>         '2r1110',(bits copyFrom: 1 to: 4).
>         '2r10',(bits copyFrom: 5 to: 10).
>         '2r10',(bits copyFrom: 11 to: 16).
>     } do: [ :radix2 |
>         answer := answer, (String with: (Character value: radix2
> asNumber)).
>     ].
>
>     ^answer
>
> On 1/1/16 5:09 AM, Hilaire wrote:
>> Le 31/12/2015 15:42, Sven Van Caekenberghe a écrit :
>>> A possible solution is to somehow start with a WideString from the beginning (or force it before doing all elements one by one).
>> In the hack you are suggesting, does it not required the whole contents
>> of the rendered page html code to be put as WideString?
>> Indeed, hacking only my object #printOn: method to send WideString to
>> the stream does not help.
>>
>> Hilaire
>>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-- 
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20160101/dad86ca3/attachment.htm


More information about the seaside mailing list