Gwangho E wrote: > Hi, > > I have just started to use forrest 0.8 on Japanese version of Windows Vista. > When I render my xml pages(saved in UTF-8) by 'forrest run', > everything goes well. > But, rendering those same xml pages by 'forrest site' creates > unreadable HTML files > in which Japanese characters were encoded incorrectly. > > When I saved all xml files in 'Shift_JIS' and changed the related line > of the sitemap.xmap > as follows, > > <map:serializer name="html" mime-type="text/html" > src="org.apache.cocoon.serialization.HTMLSerializer"> > <doctype-public>-//W3C//DTD HTML 4.01 > Transitional//EN</doctype-public> > <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system> > <encoding>Shift_JIS</encoding> > </map:serializer> > > both of 'forrest run' and 'forrest site' created correct HTML files > in Shift_JIS encoding. > > Is there anyone who knows what made the differece of rendered results > between by 'forrest run' and by 'forrest site' in processing UTF-8 xml files? > Thanks. >
Another solution to this (assuming you're serving the files using apache httpd) is to use a .htaccess file to tell the webserver what encoding you're using: AddDefaultCharset UTF-8 That line (with a newline) in a file called ".htaccess" in the root of you generated content will tell httpd that the files are UTF-8. This assumes that httpd is configured to permit delegation of access. It will enable you to change the encoding used by the http without regenerating your content. cheers stuart -- OSS Watch: http://www.oss-watch.ac.uk/
