[Seaside] Accent in generated pages
johan at inceptive.be
Wed Jun 17 22:00:06 UTC 2015
> 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.
| fullDocument |
fullDocument := WAHtmlCanvas builder
rootBlock: [:root | root meta contentType: (WAMimeType textHtml charset:'utf-8') ];
render: [ :html | html text: 'Ñuñoa' ].
'/tmp/test.html' asFileReference writeStreamDo: [ :out | out << fullDocument ].
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside