|
From: | Oliver Heimlich |
Subject: | Re: generate_html breaks documentation encoding |
Date: | Fri, 16 Jan 2015 19:18:03 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 |
Am 16.01.2015 um 08:33 schrieb Julien Bect:
Le 15/01/2015 23:13, Oliver Heimlich a écrit :The m-files are encoded in UTF-8 and most documentation strings contain non-ASCII characters. The generate_html command somehow tries to convert the document strings from iso-8859-1 to utf-8 and labels the result as iso-8859-1 in the html header. This is wrong in at least two ways and the resulting html page is broken.Hello Oliver, About the "iso-8859-1" in the HTML header: it depends on the option structure that you pass to generate_package_html (). If you use the "octave-forge" style, then yes, it is automatically labelled as "iso-8859-1"; see get_html_options (). [everyone: I can add an optional field in the structure that would allow the package manager to specify the encoding that he wants. Any thoughts about that? Does it sound like a good idea?]
No. I would just change the encoding of the octave-forge style to utf-8. Otherwise you would have to deal with characters that are not available in the target charset. The default output encoding of makeinfo is utf-8.
About the fact that "The generate_html command somehow tries to convert the document strings": I don't know about that. Can you provide a tarball for your package and give me a specific example of this conversion? [everyone: does anybody know about this conversion? whee does this happen in the package?]
The conversion happens during the call to __makeinfo__ (see my previous mail), which is a core function of octave. Until then all strings are encoded correctly in utf-8. The output of __makeinfo__ is labeled as utf-8, but has been reencoded. I haven't debugged any further yet.
I use octave 3.8.2. Do you want a tarball of the function files or the documentation files?
[Prev in Thread] | Current Thread | [Next in Thread] |