|
Bugzilla – Full Text Bug Listing |
| Summary: | enscript is locale sensitive | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.2 | Reporter: | Björn Voigt <bjoernv> |
| Component: | Other | Assignee: | Dr. Werner Fink <werner> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | CC: | mohr |
| Version: | Beta 1 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | enscript test case for German and English and UTF-8 | ||
Created attachment 102853 [details]
enscript test case for German and English and UTF-8
Which info do you need? What I need is a enscript vers9ion which is able to handle UTF-8. The current version of enscript uses a wrapper script to be able to convert _one_ language provided in UTF-8 into the appropiate latin code because this is the only code which is usable with the enscript program its self. If you have a patch which makes enscript fully compatible with UTF-8 please reopen this bug. But be aware UTF-8 is highly complicated in comparision to any 8 bit character mode like latin-1. Sorry, this is not what I mean. I know that enscript is not capable of printing UTF-8. The wrapper script therefore tries to convert UTF-8 data to ISO-8859-X. This is ok for me. The problem is, that the wrapper script does not work correctly. Enscript needs the option -E in a special form. So "-Ebash" is correct, but "-E bash" is not. Of course this violates the getopt() standard functionality. But the wrapper script uses getopt for changing the enscript arguments. I already found the problem in the wrapper script. I start "enscript" with a clean environment in trace mode: $ env -i HOME=$HOME LANG=de_DE.UTF-8 PATH=$PATH sh -x enscript -Ebash -o /dev/null /etc/skel/.bashrc [...] + CMDLINE=' -E '\''bash'\'' -o '\''/dev/null'\'' -- '\''/etc/skel/.bashrc'\''' [...] + enscript.bin -X ISO-8859-15 -E bash -o /dev/null /etc/skel/.bashrc So the problem is that we started with "-Ebash" and ended with "-E bash". Just fixed not only for -E but also for -C, -e, -H, amd -u. *** Bug 242022 has been marked as a duplicate of this bug. *** |
The enscript program does not work right in all locales. Especially it does not work right in the default UTF-8 locale settings. The problem only occurs together with the "-E" switch of enscript. "-E" is a parameter with an optional argument. It is documented as follows (from man page): -E[lang], --highlight[=lang] Highlight source code by creating a special input filter with the states program. The optional argument lang specifies the language to highlight. As a default the states makes an edu- cated guess. You can print a short description of the supported highlighting languages and file formats with the command: enscript --help-highlight The highlighting rules are defined in the `/usr/share/enscript/st/*.st' files which can be edited to cre- ate highlighting definitions for new languages. Note! You can not use your own input filters with this option. A test case is attached.