Re: How to print textfiles in Cygwin 1.7?
Andy Koppe schrieb: One workaround is to convert the file manually using iconv, e.g.: $ iconv -f utf-8 -t iso-8859-1 bla.txt | a2ps -o bla.ps This works ok. Thanks! I will try to make an alias for it. Please note that 'nano' also doesn't support UTF-8 yet. While entering characters looks like it works initially, nano will internally think that you've entered two characters when you enter an umlaut. Hence things get wonky when you try to edit them. So that may be why I get some strange behavior of nano (disappearing letters and such) when editing files with umlauts. Thanks again! Niklaus -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
Thomas Wolff schrieb: So the easiest practical solution is to use a Windows tool: notepad /p filename This works, too. Thanks! Niklaus -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
Thomas Wolff schrieb: 1. notepad /p prints to your default printer 2. for font configuration, invoke notepad manually; if you want a fixed-width font for text printing, these are recommendable for a good coverage of Unicode: Lucida Console, Courier New, Andale Mono, Everson Mono configure 10 pt font size to make sure 80 characters fit on a line, 11 pt for 72 characters 3. can somebody check/confirm this still works on Vista, please? Yes, this printing command still works in Vista, and also the font switching procedure. Niklaus -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
Corinna Vinschen schrieb: On Jan 12 15:59, Niklaus Kuehnis wrote: Hi, I've upgraded to Cygwin 1.7 (release version, clean install) and now am unable to print text files with non-ascii characters (i.e. German umlauts) from commandline. Did you read the User's Guide, especially http://cygwin.com/cygwin-ug-net/setup-locale.html ? I've now read that page. As UTF-8 is generally the preferred charset, I would like to stick to it. Does changing the language, e.g. to de_CH, change umlaut handling? It doesn't seem to, here. Best wishes, Niklaus -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
Niklaus Kuehnis wrote: 1. notepad /p prints to your default printer ... Yes, this printing command still works in Vista, and also the font switching procedure. Thanks for checking. Please note that 'nano' also doesn't support UTF-8 yet. ... So that may be why I get some strange behavior of nano (disappearing letters and such) when editing files with umlauts. Maybe you'd like to give mined a try? (Improved version to come soon.) -- Thomas -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
On Jan 15 11:08, Niklaus Kuehnis wrote: Corinna Vinschen schrieb: On Jan 12 15:59, Niklaus Kuehnis wrote: Hi, I've upgraded to Cygwin 1.7 (release version, clean install) and now am unable to print text files with non-ascii characters (i.e. German umlauts) from commandline. Did you read the User's Guide, especially http://cygwin.com/cygwin-ug-net/setup-locale.html ? I've now read that page. As UTF-8 is generally the preferred charset, I would like to stick to it. Does changing the language, e.g. to de_CH, change umlaut handling? It doesn't seem to, here. It does, though. If you read the page you have learned that setting LANG to just a language (de_CH), without a charset (.UTF-8) will set the character set to the Windows codepage which is the default ANSI codepage on your machine. In your case this is probably CP1252. If you want to be sure to use UTF-8, then say so: export LANG=de_CH.UTF-8. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
On Jan 15 11:18, Corinna Vinschen wrote: On Jan 15 11:08, Niklaus Kuehnis wrote: Corinna Vinschen schrieb: http://cygwin.com/cygwin-ug-net/setup-locale.html I've now read that page. As UTF-8 is generally the preferred charset, I would like to stick to it. Does changing the language, e.g. to de_CH, change umlaut handling? It doesn't seem to, here. It does, though. If you read the page you have learned that setting LANG to just a language (de_CH), without a charset (.UTF-8) will set the character set to the Windows codepage which is the default ANSI codepage on your machine. In your case this is probably CP1252. If you want to be sure to use UTF-8, then say so: export LANG=de_CH.UTF-8. Without the trailing dot, of course. Sorry 'bout that. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
[Re:] Language vs character settings [Re: How to print textfiles in Cygwin 1.7?]
Niklaus Kuehnis wrote: ... As UTF-8 is generally the preferred charset, I would like to stick to it. Does changing the language, e.g. to de_CH, change umlaut handling? It doesn't seem to, here. That depends... If you just have LANG in your environment to indicate the UTF-8 character set, or even no environment variable (meaning UTF-8 on cygwin), and then set LANG=de_CH inside a terminal session, your environment and your actual terminal encoding will become inconsistent, with the consequence that many programs (esp. all modern programs using the locale mechanism) will apply the wrong assumption about your terminal. That's why my suggestion for a more practical setting is: export LC_CTYPE=C.UTF-8 to establish a more persistent declaration of your terminal's behaviour. Then you can simply set LANG as you like to adjust other properties with any applications that honour it. This didn't become the standard scenario, however, due to other considerations and compatibility with Linux distributions. So my suggestion is to include this in your .profile: export LC_CTYPE=${LANG-C.UTF-8} to gain flexibility in changing LANG later. -- Thomas -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
Corinna Vinschen schrieb: I've now read that page. As UTF-8 is generally the preferred charset, I would like to stick to it. Does changing the language, e.g. to de_CH, change umlaut handling? It doesn't seem to, here. It does, though. If you read the page you have learned that setting LANG to just a language (de_CH), without a charset (.UTF-8) will set the character set to the Windows codepage which is the default ANSI codepage on your machine. In your case this is probably CP1252. If you want to be sure to use UTF-8, then say so: export LANG=de_CH.UTF-8. I set this variable (and also LC_CTYPE and LC_ALL), and printing with umlauts with bare a2ps works fine now. Thanks! Niklaus -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
2010/1/15 Niklaus Kuehnis: If you want to be sure to use UTF-8, then say so: export LANG=de_CH.UTF-8. I set this variable (and also LC_CTYPE and LC_ALL), and printing with umlauts with bare a2ps works fine now. Thanks! I can't confirm that. Sure you were printing a UTF-8 file there? Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
Andy Koppe schrieb: 2010/1/15 Niklaus Kuehnis: If you want to be sure to use UTF-8, then say so: export LANG=de_CH.UTF-8. I set this variable (and also LC_CTYPE and LC_ALL), and printing with umlauts with bare a2ps works fine now. Thanks! I can't confirm that. Sure you were printing a UTF-8 file there? You're right. I probably produced the file with rxvt that seems to run in Latin1. Niklaus -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
On 13.01.2010 07:48, ext Andy Koppe wrote: 2010/1/12 Niklaus Kuehnis: I've upgraded to Cygwin 1.7 (release version, clean install) and now am unable to print text files with non-ascii characters (i.e. German umlauts) from commandline. On Cygwin 1.5 printing used to work with a2ps but now all umlauts are replaced by strange characters (i.e. the u with diaeresis appears as a capital A with a tilde and '1/4'). The same happens with lpr. The files print fine using the Windows text editor. The problem is that both a2ps and lpr don't yet support UTF-8. So the easiest practical solution is to use a Windows tool: notepad /p filename as I also use it for the print function of my editor mined; notepad auto-detects UTF-8 nicely! Thomas -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
Some additional notes on this: On 13.01.2010 07:48, ext Andy Koppe wrote: 2010/1/12 Niklaus Kuehnis: I've upgraded to Cygwin 1.7 (release version, clean install) and now am unable to print text files with non-ascii characters (i.e. German umlauts) from commandline. On Cygwin 1.5 printing used to work with a2ps but now all umlauts are replaced by strange characters (i.e. the u with diaeresis appears as a capital A with a tilde and '1/4'). The same happens with lpr. The files print fine using the Windows text editor. The problem is that both a2ps and lpr don't yet support UTF-8. So the easiest practical solution is to use a Windows tool: notepad /p filename as I also use it for the print function of my editor mined; notepad auto-detects UTF-8 nicely! 1. notepad /p prints to your default printer 2. for font configuration, invoke notepad manually; if you want a fixed-width font for text printing, these are recommendable for a good coverage of Unicode: Lucida Console, Courier New, Andale Mono, Everson Mono configure 10 pt font size to make sure 80 characters fit on a line, 11 pt for 72 characters 3. can somebody check/confirm this still works on Vista, please? Thanks Thomas -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
On Jan 12 15:59, Niklaus Kuehnis wrote: Hi, I've upgraded to Cygwin 1.7 (release version, clean install) and now am unable to print text files with non-ascii characters (i.e. German umlauts) from commandline. Did you read the User's Guide, especially http://cygwin.com/cygwin-ug-net/setup-locale.html ? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
try using pdf creator and make it shared, then you can use it have you tested printing a plain text from command shell eg my.txt lpt1 or the like Niklaus Kuehnis wrote: Hi, I've upgraded to Cygwin 1.7 (release version, clean install) and now am unable to print text files with non-ascii characters (i.e. German umlauts) from commandline. On Cygwin 1.5 printing used to work with a2ps but now all umlauts are replaced by strange characters (i.e. the u with diaeresis appears as a capital A with a tilde and '1/4'). The same happens with lpr. The files print fine using the Windows text editor. I'm using mintty on Windows Vista Business and nano to produce the files. Files with umlauts are recognized as UTF-8 by the file command. Is there an alternative to a2ps or a fix/workaround? Thanks in advance! Niklaus $ a2ps --version GNU a2ps 4.13 $ uname -a CYGWIN_NT-6.0 machinename 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin $ mintty --version mintty 0.5.6 $ nano --version GNU nano Version 2.0.9 (compiliert um 13:11:06, Oct 19 2008) -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple -- View this message in context: http://old.nabble.com/How-to-print-textfiles-in-Cygwin-1.7--tp27128849p27137998.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: How to print textfiles in Cygwin 1.7?
2010/1/12 Niklaus Kuehnis: I've upgraded to Cygwin 1.7 (release version, clean install) and now am unable to print text files with non-ascii characters (i.e. German umlauts) from commandline. On Cygwin 1.5 printing used to work with a2ps but now all umlauts are replaced by strange characters (i.e. the u with diaeresis appears as a capital A with a tilde and '1/4'). The same happens with lpr. The files print fine using the Windows text editor. The problem is that both a2ps and lpr don't yet support UTF-8. Instead, they interpret the UTF-8 bytes as ISO-8859-1, which is why umlauts, which are represented as two bytes in UTF-8, appear as two funny characters. a2ps has the -X option to tell it explicitly what encoding to use, but unfortunately: $ a2ps -X UTF-8 a2ps: unknown encoding `utf-8' One workaround is to convert the file manually using iconv, e.g.: $ iconv -f utf-8 -t iso-8859-1 bla.txt | a2ps -o bla.ps (Of course this only works properly as long as your file doesn't have any characters outside iso-8859-1.) I'm using mintty on Windows Vista Business and nano to produce the files. Files with umlauts are recognized as UTF-8 by the file command. Please note that 'nano' also doesn't support UTF-8 yet. While entering characters looks like it works initially, nano will internally think that you've entered two characters when you enter an umlaut. Hence things get wonky when you try to edit them. Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple