[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RDoc Accents

James Gray

12/19/2004 11:21:00 PM

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

Thanks.

James Edward Gray II



11 Answers

Aredridel

12/19/2004 11:35:00 PM

0

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?

"é" 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



James Britt

12/19/2004 11:54:00 PM

0

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/l...



James


James Gray

12/20/2004 12:09:00 AM

0

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;
>
> http://www.w3.org/MarkUp/html3/l...

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

James Edward Gray II



James Britt

12/20/2004 1:48:00 AM

0

James Edward Gray II wrote:
> 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;
>>
>> http://www.w3.org/MarkUp/html3/l...
>
>
> That's equivalent to &eacute; and it still doesn't work. ;)

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


James Gray

12/20/2004 1:54:00 AM

0

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

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

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

James Edward Gray II



Dave Thomas

12/20/2004 3:33:00 PM

0


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?

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 :)

Cheers

Dave



Dave Thomas

12/20/2004 3:35:00 PM

0


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.

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



James Britt

12/21/2004 1:21:00 AM

0

Dave Thomas wrote:
>
> 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.
>
>
> 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


Dave Thomas

12/21/2004 11:57:00 PM

0


On Dec 20, 2004, at 7:21 PM, James Britt wrote:
> What is the syntax for setting the charset in the source code?
>
rdoc --charset=xxxx



Jim Weirich

12/22/2004 1:22:00 AM

0

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#rd...

--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"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)