Rdoc fail encoding iso-8859-1

Hi all,

I’m quite new to ruby, so forgive me if this is a dumb question.

I’m trying to generate RDoc documentation for my current project and I
receive this error:


#rdoc tesi/ --main tesi/INDEX.rdoc --op doc2http --charset=iso-8859-2

Parsing sources…
unable to convert “\x88” from ASCII-8BIT to UTF-8 for
tesi/tesi_in_text.rdoc, skipping

Generating Darkfish format into /doc2http…

The problematic characte is an “à”.
I’ve tried also using “–encoding iso-8859-2” but receive the same
error.

I’m on Mac OS X 10.7.5 using RDoc 4.0.1

I’m from Italy and the documentation should be in Italian due to the
specifics of the project itself.

Is there a way to fix this problem?

Thanx for the help
Daniele

Excerpts from daniele scarano’s message of 2013-09-26 16:05:05 +0200:

Parsing sources…
I’m on Mac OS X 10.7.5 using RDoc 4.0.1

I’m from Italy and the documentation should be in Italian due to the
specifics of the project itself.

Is there a way to fix this problem?

Thanx for the help
Daniele

Are you sure iso-8859-2 is the correct encoding? According to wikipedia
[1], this encoding is “for eastern european languages that are written
in the Latin script”, and they don’t include Italian. I tried inserting
accented characters from my keyboard in an iso-8859-2 encoded file and
from a couple of editors and they both complained when saving.

The correct encoding for the Italian language, if you don’t want to use
UTF-8, should be iso-8859-1 or iso-8859-15.

I hope this helps

Stefano

Excerpts from daniele scarano’s message of 2013-09-26 17:23:31 +0200:

thanx
Dan

Why do you say that UTF-8 doesn’t have accented characters? I’ve been
using it for some time to write in both English and Italian and have
experienced no problems with accented characters.

At any rate, I’ve trying running RDoc on an iso-8859-1 encoded file with
accented characters and I found out the following:

  • I needed to use the --encoding option rather than --charset (otherwise
    it gave me the same error you got)
  • I needed to specify the name of the encoding using capital letters:
    –encoding ISO-8859-1, rather than --encoding iso-8859-1, otherwise
    I’d still get the error.

Stefano

You’re right Stefano, iso-8859-1 is the correct encoding for Italian,
sorry for my mess, I was trying different character set to find a
temporary workaround. I’ve also tried iso-8859-15

I receive the same error with iso-8859-1.

The problem in using UTF-8 is that there’s no accented letters in that
encoding. I need extensive italian comments in my project that requires
those letteres :confused:

thanx
Dan

As I said in the beginning it was a dumb question.
The --encoding option works fine even for me if I use uppercase letter
ISO-8859-1

I’ve always had a bad relationship with character sets and locales :wink:

thanx for the help
Dan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs