Re: Re: TableReport slow down

Bob Arning <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
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 signU+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
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.