[Seaside] Displaying non-ascii characters
Avi Bryant
avi at beta4.com
Thu Nov 11 18:03:50 CET 2004
On Nov 11, 2004, at 5:45 PM, Yar Hwee Boon wrote:
> I'm trying to display non-ascii multi-byte characters and as a start,
> I implement #renderContentOn: as
>
> renderContentOn: html
> | f s |
> f := FileStream fileNamed: 'path-to-some-file'.
> [s := f contents]
> ensure: [f close].
> html text: s
>
> I'm running windows and opening the file in notepad shows the text
> correctly. But garbage is shown on the HTML page. Can anyone help?
> Thanks
Seaside declares an encoding of UTF-8 (see WAResponse>>initialize). So
if you have text in another encoding, you either need to convert it to
UTF-8, or change the content-type header.
Avi
More information about the Seaside
mailing list