However when I run a2ps from the commandline I get: "a2ps: unknown medium `libpaper'"
So I tried googling for it and I came up with --> http://www.inf.enst.fr/~demaille/a2ps/bugs.html#libpaper
which essentially tells me to delete a couple of .cfg files in /etc/ so I tried this, and I just get a new error which is: "a2ps: cannot find file `level1.ppd': No such file or directory"
I don't really get why I'm ending up in this much trouble, the setup was trivial to follow, there were no significant options. It was mostly next, next, next. So I doubt I could have done something wrong, so why does the instalation not just work?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is an error in the setup of A2ps. It will be fixed. In the meantime, do not delete the cfg files, but replace in a2ps-ste.cfg line 17 (Options: --medium=libpaper) with:
Options: --medium=A4
Thanks for reporting this bug.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you very much for a quick answer. And your advice did the trick too :)
Perhaps you can answer a second question (not equally serious though). When I a2ps my source code I get the date in the lower left side of the page written in Danish, I'd like it to be in english.
Now I do live in Denmark but windows is installed in an english version and I'm pretty sure I chose English during installation. So in light of this, any idea how I can make it write the date in english as opposed to danish?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The default right footer is the date in the default language. Because of the way setlocale and strftime have been implemented on MS-Windows (e.g. they don't look at environment variables), it is not possible to change the language of this date with the present port of a2ps. The only solution would be to change the footer in a2ps.cfg or .ap2s (in your HOME directory) to something else.
As to why the date is in Danish, I can only guess. Apparently, somewhere in your system it is still recorded that the default language is Danish.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> Because of the way setlocale and strftime have been implemented
> on MS-Windows (e.g. they don't look at environment variables), it
> is not possible to change the language of this date with the
> present port of a2ps.
FWIW, I've got an as yet unposted' MinGW wrapper forsetlocale',
which does honour environment settings. I hope to post a snapshot
within the month ahead; you may wish to consider using this, in any
future ports.
FYI, the `setlocale' wrapper function will use lookup tables to
translate ISO-639 language codes, and ISO-3166 territory codes, to
their (possibly non-standard) Microsoft equivalents. The lookup
tables are based on Wikipaedia info, which is published under the
GPL; hence, this wrapper will be a GPL add-on for MinGW.
Regards,
Keith.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-01-02
An alternative to lookup tables is to call EnumSystemLocales() and for
each locale call GetLocaleInfo(LOCALE_SISO639LANGNAME) and
GetLocaleInfo(LOCALE_SISO3166CTRYNAME) and compare those to the
environment variable values until you get a match.
Then you call GetLocaleInfo(LOCALE_SENGLANGUAGE) and
GetLocaleInfo(LOCALE_SENGCOUNTRY), join these two strings with
an underscore, and call setlocale() on the result.
Some additional complexity is caused in for instance the case of
the former Yugoslavia, where language and country codes change too
fast for the Win32 API to keep up (for instance, the API has LANG_SERBIAN ==
LANG_CROATIAN which probably is a considered a quite rude point of view
nowadays).
An interesting suggestion, thanks; I'll certainly consider it.
The lookup tables I'm using at present are faster; I keep them
as ordered tuples, and do a binary search for the ISO-639 and
ISO-3166 `keys', extracted from the environment strings.
OTOH, your method relieves me of the burden of maintaining my
lookup tables, and it saves the memory overhead for storing them;
and maybe the loss of performance resulting from the sequential
search isn't too critical, with today's processors.
Regards,
Keith.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've installed the setup for a2ps for windows from here http://sourceforge.net/project/downloading.php?groupname=gnuwin32&filename=a2ps-4.13b-1.exe&use_mirror=mesh
However when I run a2ps from the commandline I get: "a2ps: unknown medium `libpaper'"
So I tried googling for it and I came up with --> http://www.inf.enst.fr/~demaille/a2ps/bugs.html#libpaper
which essentially tells me to delete a couple of .cfg files in /etc/ so I tried this, and I just get a new error which is: "a2ps: cannot find file `level1.ppd': No such file or directory"
I don't really get why I'm ending up in this much trouble, the setup was trivial to follow, there were no significant options. It was mostly next, next, next. So I doubt I could have done something wrong, so why does the instalation not just work?
This is an error in the setup of A2ps. It will be fixed. In the meantime, do not delete the cfg files, but replace in a2ps-ste.cfg line 17 (Options: --medium=libpaper) with:
Options: --medium=A4
Thanks for reporting this bug.
Thank you very much for a quick answer. And your advice did the trick too :)
Perhaps you can answer a second question (not equally serious though). When I a2ps my source code I get the date in the lower left side of the page written in Danish, I'd like it to be in english.
Now I do live in Denmark but windows is installed in an english version and I'm pretty sure I chose English during installation. So in light of this, any idea how I can make it write the date in english as opposed to danish?
The default right footer is the date in the default language. Because of the way setlocale and strftime have been implemented on MS-Windows (e.g. they don't look at environment variables), it is not possible to change the language of this date with the present port of a2ps. The only solution would be to change the footer in a2ps.cfg or .ap2s (in your HOME directory) to something else.
As to why the date is in Danish, I can only guess. Apparently, somewhere in your system it is still recorded that the default language is Danish.
> Because of the way setlocale and strftime have been implemented
> on MS-Windows (e.g. they don't look at environment variables), it
> is not possible to change the language of this date with the
> present port of a2ps.
FWIW, I've got an
as yet unposted' MinGW wrapper forsetlocale',which does honour environment settings. I hope to post a snapshot
within the month ahead; you may wish to consider using this, in any
future ports.
FYI, the `setlocale' wrapper function will use lookup tables to
translate ISO-639 language codes, and ISO-3166 territory codes, to
their (possibly non-standard) Microsoft equivalents. The lookup
tables are based on Wikipaedia info, which is published under the
GPL; hence, this wrapper will be a GPL add-on for MinGW.
Regards,
Keith.
An alternative to lookup tables is to call EnumSystemLocales() and for
each locale call GetLocaleInfo(LOCALE_SISO639LANGNAME) and
GetLocaleInfo(LOCALE_SISO3166CTRYNAME) and compare those to the
environment variable values until you get a match.
Then you call GetLocaleInfo(LOCALE_SENGLANGUAGE) and
GetLocaleInfo(LOCALE_SENGCOUNTRY), join these two strings with
an underscore, and call setlocale() on the result.
Some additional complexity is caused in for instance the case of
the former Yugoslavia, where language and country codes change too
fast for the Win32 API to keep up (for instance, the API has LANG_SERBIAN ==
LANG_CROATIAN which probably is a considered a quite rude point of view
nowadays).
See the functions enum_locale_proc() and do_pre_parse_initialization()
in http://svn.gnome.org/svn/gtk+/trunk/gtk/gtkmain.c for example code
(LGPL licensed).
--tml
An interesting suggestion, thanks; I'll certainly consider it.
The lookup tables I'm using at present are faster; I keep them
as ordered tuples, and do a binary search for the ISO-639 and
ISO-3166 `keys', extracted from the environment strings.
OTOH, your method relieves me of the burden of maintaining my
lookup tables, and it saves the memory overhead for storing them;
and maybe the loss of performance resulting from the sequential
search isn't too critical, with today's processors.
Regards,
Keith.