Ada identifiers not detected (partial fix included)
Brought to you by:
weaselp
Ada identifiers are not correctly detected. The first
problem is that it detects words like A__B and B_ as
Ada identifiers, which they are not. The second
problem is that it does not detect words like Täthet
and Anlaß as identifiers, which they are.
Logged In: YES
user_id=31104
After getting some help at
http://www.nntp.perl.org/group/perl.beginners/83569 I have
modified the partial fix:
* use character class [:alpha:]
* use more compact and clever character class [^\W_]
* use the non-capturing group (?:)
The second problem is more complicated. Perl expects input
in UTF-8 encoding. Since Ada sourcecode is in latin1
(comments can be in any encoding), an input layer is
needed. An output layer is probably also needed, since HTML
should have things like "å".
Logged In: YES
user_id=31104
Now I finally made a patch that fixes all the problem cases
for me. It adds "use locale;". I also added character set
headers to the HTML templates. I had to make sure that LANG
is set to swedish in the shell where I run code2html to
make it work.
Patch that fixes the problem for me if I have LANG set to swedish.