Dr.Ruud wrote:

Erik schreef:

This is perl, v5.8.7 built for i686-linux (Gentoo). It seems like it
is not the file code2html itself it complains about. I can also
colorize the file itself. It is when I try it with "use encoding
'latin1';" on the Ada file that it fails. If I change the letter 'å'
to something else, code2html works. [...]

with Ada.Text_IO; use Ada.Text_IO;
procedure Prov is
  Aål     : Natural := 0;
  A_      : Natural := 0; --  Illegal
  A_Boro  : Natural := 0;
  Go_9r_5 : Natural := 0;
  9_Are_7 : Natural := 0; --  Illegal
  AB__CD  : Natural := 0; --  Illegal
  _P      : Natural := 0; --  Illegal
begin
  Put_Line ("Aål =" & Aål'Img);
end Prov;
Perl expects the input to be (by default) encoded in UTF-8, so you
either need to change the code (add an IO-layer to the input), OR you
should iconv the input:

 iconv -f latin1 -t UTF-8 prov.adb > prov.adb.utf8
iconv converts 'å' into "Ã¥". Then code2html reconizes à but not ¥ as a letter, so the output of "Aål" is:
<font color="#2040a0">AÃ</font>¥<font color="#2040a0">l</font>


Since Ada code is in latin1, I suppose an input layer is needed. And since HTML should have things like "&aring;", an output layer is also needed. Seems like a lot of work.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to