Sourceware Bugzilla – Bug 14878
gap.awk makes bad conversion tables if u+0001.. u+0006 not mapped
Last modified: 2012-11-26 13:57:48 UTC
Created attachment 6753 [details]
charmap that shows the bug
If a charmap doesn't define a mapping for at least one character in the range u+0001 to u+0006 then the translation table generated by gap.awk is broken. For example with the attached TEST charmap then u+0041 gets mapped to a \4a instead of \x41.
The bug happens because gap.awk sets "last" (the last codepoint output) to zero, instead of -1. A patch to gap.awk and gaptab.awk is attached.
Created attachment 6754 [details]
patch to gap.awk and gaptab.awk to fix bug