[webgen-users] Chinese Webpages

1 view
Skip to first unread message

Proven

unread,
Nov 16, 2009, 6:43:41 AM11/16/09
to webgen...@rubyforge.org
Hi All,

I'm a new user, and found that if I revise the output index.html file
(use notepad to change the file code from ANSI to UTF-8), it can
display Chinese character normally.

But if I revise the /src file, ie, default template and index page
file to UTF-8 format, it can not parse the index page file.

How should I do to automatically generate Chinese web page?

Appreciate.
_______________________________________________
webgen-users mailing list
webgen...@rubyforge.org
http://rubyforge.org/mailman/listinfo/webgen-users

Damien Pollet

unread,
Nov 16, 2009, 9:07:02 AM11/16/09
to Proven, webgen...@rubyforge.org
I pasted chinese characters in my src/index.page and everything went smoothly.

What code are you changing in the html file ?
If you mean the meta content-type html tag, or the xml declaration,
then this would be in your src/default.template file. Edit this one
and all pages will be generated accordingly.

Else I guess that would mean one of the filters does not like your
encoding, but we'd need more details to be sure.

Cheers

--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet

Thomas Leitner

unread,
Nov 17, 2009, 1:16:51 AM11/17/09
to webgen...@rubyforge.org
> But if I revise the /src file, ie, default template and index page
> file to UTF-8 format, it can not parse the index page file.

There could be a problem with the BOM (Byte-Order-Marker) that Notepad
normally inserts into a file when saving it as UTF-8. Try using
another editor that does not store the BOM. And/or run webgen with the
`-v` and `-l 0` options to get more debug output which you should post
here!

As Damien already pointed out, there should be no problem using Chinese
characters in the .template or .page files since webgen does not care
about the source encoding and Maruku, the default markup processor,
should handle non-ASCII characters as well.

Best regards,
Thomas

Reply all
Reply to author
Forward
0 new messages