Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
Upstream bug report at: https://sourceforge.net/tracker/index.php?func=detail&aid=1487803&group_id=2902&atid=102902 Ada identifiers are not correctly recognized. 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
Upstream bug report at: https://sourceforge.net/tracker/index.php?func=detail&aid=1487803&group_id=2902&atid=102902 Ada identifiers are not correctly recognized. 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.
Created an attachment (id=86687) [details] Fix for the first part of the problem.
Created an attachment (id=86708) [details] Patch that fixes the first part of the problem. 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 "å".
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.
Created an attachment (id=86744) [details] Patch that fixes the problem for me if I have LANG set to swedish.
Thanks, committed for code2html-0.9.1-r1.