RDoc Accents

I need to include an accented e in my rdoc documentation. é does not work. Any suggestions?

Thanks.

James Edward Gray II

Type it literally, and perhaps hack the template to make sure it uses
the same encoding in the Content-type http-equiv tag?

"é" should work in that case ... you just have to pick between
ISO8859-1, Windows-1250 or UTF-8 encoding as far as I know.

Ari

···

On Mon, 20 Dec 2004 08:20:44 +0900, James Edward Gray II <james@grayproductions.net> wrote:

I need to include an accented e in my rdoc documentation. &eacute;
does not work. Any suggestions?

Aredridel wrote:

···

On Mon, 20 Dec 2004 08:20:44 +0900, James Edward Gray II > <james@grayproductions.net> wrote:

I need to include an accented e in my rdoc documentation. &eacute;
does not work. Any suggestions?

&#233;

http://www.w3.org/MarkUp/html3/latin1.html

James

You can change the encoding generated by RDoc with the --charset option. All this changes is the HTTP header--it's up to you to type the correct octets into the source :slight_smile:

Cheers

Dave

···

On Dec 19, 2004, at 17:34, Aredridel wrote:

On Mon, 20 Dec 2004 08:20:44 +0900, James Edward Gray II > <james@grayproductions.net> wrote:

I need to include an accented e in my rdoc documentation. &eacute;
does not work. Any suggestions?

Type it literally, and perhaps hack the template to make sure it uses
the same encoding in the Content-type http-equiv tag?

That's equivalent to &eacute; and it still doesn't work. :wink: Thanks though.

James Edward Gray II

···

On Dec 19, 2004, at 5:53 PM, James Britt wrote:

Aredridel wrote:

On Mon, 20 Dec 2004 08:20:44 +0900, James Edward Gray II >> <james@grayproductions.net> wrote:

I need to include an accented e in my rdoc documentation. &eacute;
does not work. Any suggestions?

&#233;

Character Entity Set(s)

James Edward Gray II wrote:

Aredridel wrote:

I need to include an accented e in my rdoc documentation. &eacute;
does not work. Any suggestions?

&#233;

Character Entity Set(s)

That's equivalent to &eacute; and it still doesn't work. :wink:

Sort of, but not exactly ...

> Thanks

though.

I just did a little test, though, and it appears that rdoc munges the text. &233; becomes &amp;233; in the output html, so the desired character never appears.

So one needs to tell Rdoc to not escape entity references.

James

···

On Dec 19, 2004, at 5:53 PM, James Britt wrote:

On Mon, 20 Dec 2004 08:20:44 +0900, James Edward Gray II >>> <james@grayproductions.net> wrote:

Yeah, that's exactly what I was hoping someone would feed me.

James Edward Gray II

···

On Dec 19, 2004, at 7:47 PM, James Britt wrote:

So one needs to tell Rdoc to not escape entity references.

Why the assumption that RDoc generates just HTML?

Just type the characters you want, as you want them, and make sure the character set is set correctly.

Cheers

Dave

···

On Dec 19, 2004, at 19:47, James Britt wrote:

I just did a little test, though, and it appears that rdoc munges the text. &233; becomes &amp;233; in the output html, so the desired character never appears.

So one needs to tell Rdoc to not escape entity references.

Dave Thomas wrote:

I just did a little test, though, and it appears that rdoc munges the text. &233; becomes &amp;233; in the output html, so the desired character never appears.

So one needs to tell Rdoc to not escape entity references.

Why the assumption that RDoc generates just HTML?

Just type the characters you want, as you want them, and make sure the character set is set correctly.

What is the syntax for setting the charset in the source code?

I suspect most people use RDoc to generate HTML docs for other people's source, and will not know to use specific command line switches.

(Does rubygems have a way for the packager to specify rdoc command-line args?)

Thanks,

James

···

On Dec 19, 2004, at 19:47, James Britt wrote:

rdoc --charset=xxxx

···

On Dec 20, 2004, at 7:21 PM, James Britt wrote:

What is the syntax for setting the charset in the source code?

http://rubygems.rubyforge.org/wiki/wiki.pl?GemspecReference#rdoc_options

···

On Monday 20 December 2004 08:21 pm, James Britt wrote:

(Does rubygems have a way for the packager to specify rdoc command-line
args?)

--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

Jim Weirich wrote:

···

On Monday 20 December 2004 08:21 pm, James Britt wrote:

(Does rubygems have a way for the packager to specify rdoc command-line
args?)

http://rubygems.rubyforge.org/wiki/wiki.pl?GemspecReference#rdoc_options

Ah, quite good. I was wondering how one could ensure that rodc would correctly render odd encodings when run by someone other than the source creator, who of course knows to use the --charset switch.

Thanks,

James