non-ASCII characters in Haddock documentation
Hello, how do I insert non-ASCII and maybe even non-Latin-1 characters in Haddock documentation? Wolfgang
Am Freitag, 13. Februar 2004 01:23 schrieben Sie:
wolfgang:
Hello,
how do I insert non-ASCII and maybe even non-Latin-1 characters in Haddock documentation?
Wolfgang
Looks like it might be difficult. The haddock lexer src has:
$alphanum = [A-Za-z0-9]
So, non-ascii might not be lexed.
Hello, I meant non-ASCII characters in source code comments like this: {-| The execution time of this function is /n³/. -} Currently, Haddock seems to copy the bytes making up the non-ASCII character verbatim to the HTML file. But since the HTML file doesn't contain a character set specification, it is illformed and it depends on the browser how this situation is handled.
-- Don
Wolfgang
Am Sonntag, 15. Februar 2004 06:01 schrieb Ashley Yakeley:
In article <200402121958.44935.wolfgang@jeltsch.net>,
Wolfgang Jeltsch <wolfgang@jeltsch.net> wrote:
how do I insert non-ASCII and maybe even non-Latin-1 characters in Haddock documentation?
Can't you use HTML entities?
Haddock isn't restricted to HTML output. So it wouldn't make much sense if HTML entities could be used. As I understand, only the Haddock markup characters ("/", "@" etc.) have special meaning in doc comments. So the logical thing would be if, e.g., "ß" would be translated to the HTML code "ß" in order to show up as "ß" in the browser. I will check this soon. Wolfgang
participants (3)
-
Ashley Yakeley -
dons@cse.unsw.edu.au -
Wolfgang Jeltsch