<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 02 Jan 2016, at 01:22, Sven Van Caekenberghe &lt;<a href="mailto:sven@stfx.eu" class="">sven@stfx.eu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Johan's suggestion is an easy solution, but basically comes down to 'do not use anything outside Latin1 unless you HTML encode it', which is (1) quite limited (2) should not be your job.</span></div></blockquote></div><br class=""><div class="">No, that’s not what I am suggesting and there is absolutely no issue when adding widestrings to the Seaside document when generating. That is what I wanted to make sure when I asked Hilaire to report the issue on github.&nbsp;</div><div class="">As Hilaire points out himself (and your code snippets also demonstrate that), the issue is the string concatenation before you put the string on the Seaside document:</div><div class=""><br class=""></div><div class=""><div class="">Time millisecondsToRun: [WAHtmlCanvas builder render: [ :html |</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>1500 timesRepeat: [ html text: 'hello', '€' ] ]].</div><div class=""><br class=""></div><div class="">-&gt; +- 3000ms on my machine</div><div class=""><br class=""></div><div class="">Time millisecondsToRun: [WAHtmlCanvas builder render: [ :html |</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>1500 timesRepeat: [ html text: 'hello'; text: '€' ] ]].</div></div><div class=""><br class=""></div><div class="">-&gt; +- 5ms on my machine</div><div class=""><br class=""></div><div class="">My suggestion is not to use the #printOn: method for rendering the object on a Seaside canvas, but rather implement a #renderOn: method that avoids concatenating the String and WideString instances.</div><div class=""><br class=""></div><div class="">cheers</div><div class="">Johan</div></body></html>