[Seaside] Accent in generated pages
alexandre.bergel at me.com
Thu Jun 18 17:38:47 UTC 2015
Thanks Johan & Sven!
> On Jun 17, 2015, at 7:00 PM, Johan Brichau <johan at inceptive.be> wrote:
>> On 17 Jun 2015, at 23:52, Sven Van Caekenberghe <sven at stfx.eu> wrote:
>> I am sorry, like I said: 'I just don't know why it does not work in Seaside, normally special characters should just work, no need to do anything special.'
> It doesn’t work because this is not exactly using Seaside.
> It’s using the Seaside canvas, and that’s it.
> As you said, the browser does not get any mimetype and it seems Safari doesn’t take utf-8 as the default..
> When you use the WABuilder, there’s the #rootBlock: method to render the root part of the document, where it seems one can pass the encoding to be used by the browser.
> Try this:
> | fullDocument |
> fullDocument := WAHtmlCanvas builder
> fullDocument: true;
> rootBlock: [:root | root meta contentType: (WAMimeType textHtml charset:'utf-8') ];
> render: [ :html | html text: 'Ñuñoa' ].
> '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << fullDocument ].
> seaside mailing list
> seaside at lists.squeakfoundation.org
Alexandre Bergel http://www.bergel.eu
More information about the seaside