Several Mutt usage question

2009-07-13 Thread Paul Grinberg
Hi,

2 Questions arise:

1) How do I forward e-mail with attachments? if I just press f, then
attachements are stripped.

2) How do I read an e-mails that are in Hebrew or Russian?

It usually displays something like this...
\343\305\314\325\300

Best,
Paul



Re: use current folder name as argument to abitrary command

2009-07-13 Thread Grant Edwards
On 2008-12-12, Noah Sheppard nhshepp...@taylor.edu wrote:
 Esteemed mutt users,

 I would like to be able to use the current folder name as an
 argument to arbitrary commands.

I repeatedly submitted a patch that did that.  It was rejected.
[I don't remember what shortcut character I made expand into
the current folder.]  I eventually gave up.  Hopefully you'll
have better luck.

-- 
Grant Edwards   grante Yow! There's enough money
  at   here to buy 5000 cans of
   visi.comNoodle-Roni!



Re: Several Mutt usage question

2009-07-13 Thread Michael Tatge
* On Mon, Jul 13, 2009 09:01AM -0400 Paul Grinberg (pgrinb...@nyc.saic.com) 
muttered:
 1) How do I forward e-mail with attachments? if I just press f, then
 attachements are stripped.

see $mime_forward

 2) How do I read an e-mails that are in Hebrew or Russian?
 
 It usually displays something like this...
 \343\305\314\325\300

Set propper locales and use a font that can display those characters.
utf-8 comes to mind.

HTH,

Michael
-- 
if (argc  1  strcmp(argv[1], -advice) == 0) {
printf(Don't Panic!\n);
exit(42);
}
(Arnold Robbins in the LJ of February '95, describing RCS)

PGP-Key-ID: 0xDC1A44DD
Jabber: init...@amessage.de


Re: Several Mutt usage question

2009-07-13 Thread Joost Kremers
On Mon, Jul 13, 2009 at 05:13:47PM +0200, Michael Tatge wrote:
 * On Mon, Jul 13, 2009 09:01AM -0400 Paul Grinberg (pgrinb...@nyc.saic.com) 
 muttered:
  2) How do I read an e-mails that are in Hebrew or Russian?
  
  It usually displays something like this...
  \343\305\314\325\300
 
 Set propper locales and use a font that can display those characters.
 utf-8 comes to mind.

hebrew might require a bit more than that because it runs right-to-left. i have
no idea if mutt handles it, but it probably also requires a terminal emulator
that can handle it.


-- 
Joost Kremers
Life has its moments


Re: Several Mutt usage question

2009-07-13 Thread Paul Grinberg
Michael,

Thank you for the reply.

1) Resolved.
set mime_forward = yes

2) I have following in my .muttrc

set charset=koi8-r

and I tried utf-8  but it is still jibrish...


[pgrinb...@panther ~]$ cat /etc/sysconfig/i18n
LANG=en_US.UTF-8
SYSFONT=latarcyrheb-sun16
[pgrinb...@panther ~]$

Best,
Paul


-Original Message-
From: owner-mutt-us...@mutt.org [mailto:owner-mutt-us...@mutt.org] On
Behalf Of Michael Tatge
Sent: Monday, July 13, 2009 11:14 AM
To: mutt-users@mutt.org
Subject: Re: Several Mutt usage question

* On Mon, Jul 13, 2009 09:01AM -0400 Paul Grinberg
(pgrinb...@nyc.saic.com) muttered:
 1) How do I forward e-mail with attachments? if I just press f, then
 attachements are stripped.

see $mime_forward

 2) How do I read an e-mails that are in Hebrew or Russian?
 
 It usually displays something like this...
 \343\305\314\325\300

Set propper locales and use a font that can display those characters.
utf-8 comes to mind.

HTH,

Michael
-- 
if (argc  1  strcmp(argv[1], -advice) == 0) {
printf(Don't Panic!\n);
exit(42);
}
(Arnold Robbins in the LJ of February '95, describing RCS)

PGP-Key-ID: 0xDC1A44DD
Jabber: init...@amessage.de


Re: Several Mutt usage question

2009-07-13 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Monday, July 13 at 11:30 AM, quoth Paul Grinberg:
2) I have following in my .muttrc

set charset=koi8-r

This is pretty standard advice on this mailing list by now, but it's 
always worth repeating:

 Do not set $charset yourself.

It is (almost) always the wrong thing to do. The mutt manual includes 
a note that says $charset should only be set in case Mutt isn't abled 
[sic] to determine the character set used correctly. That isn't 
sufficiently emphatic. Mutt is virtually always able to determine the 
correct character set based on your system environment (i.e. LANG 
and/or LC_CTYPE). If mutt derives an incorrect value from those 
variables (i.e. if those variables are set up incorrectly), then LOTS  
of things are probably broken in your setup. Mutt uses lots of 
system-based string functions (such as isspace()) that do not read 
mutt's config file and rely on those environment variables to define 
the correct character set. In other words, if the environment 
variables are wrong such that mutt can't figure out the right $charset 
setting, then most of the things that mutt relies upon are probably 
not working right either.

 2) How do I read an e-mails that are in Hebrew or Russian?

 It usually displays something like this...
 \343\305\314\325\300

The answer here is somewhat long (because it depends on your system), 
so the short answer is to read http://wiki.mutt.org/?MuttFaq/Charset 
to understand what's going on.

The logic here is that if mutt displays a character in \123 form, that 
means that mutt has no idea what that character is. If mutt knows what 
the character is but thinks that the character cannot be properly 
displayed, it will replace the character with a question mark. So, the 
fact that it shows up as \343 (or some other number) means, 
essentially, that mutt doesn't know whether that character is 
printable or not, which boils down to: you have messed up your 
$charset setting. Let mutt detect that setting automatically, and it 
will probably get the correct value all by itself. If mutt gets the 
wrong value (or if mutt is still unable to display Hebrew and Russian 
emails), then your environment variables (which mutt and most of the 
rest of your system rely on) are probably incorrect.

To start with, you probably want to make sure that you don't have any 
LC_* variables set (e.g. LC_CTYPE). The primary way to fuss with this 
stuff is to use the LANG environment variable. My guess is that the 
setting in /etc/sysconfig/i18n is correct unless you don't want things 
to be in English.

To find out what values your system supports for the LANG variable, 
run this command:

 locale -a

That will print out a whole bunch, but the value you have 
(en_US.UTF-8) ought to be in that list. Note that capitalization and 
hyphenation MATTERS, so utf8 is not the same as UTF-8 or utf-8 (yes, I 
know that seems pretty stupid).

To prove to yourself that your locales (in other words, the LANG 
variable) are set up correctly, use the perl trick:

 perl -e 

If your locales are set up correctly, that should do nothing and print 
nothing, but if they're wrong it should complain loudly. To prove that 
it would normally complain, try this:

 env LANG=doesnotexist perl -e 

Often times, just getting this right (and removing the set 
charset=... nonsense from your muttrc) is enough to magically fix 
your mutt display problems. If it doesn't, then something else is set 
up improperly, and we'll be able to figure it out based on what the 
symptoms are at that point.

~Kyle
- -- 
Of course it's the same old story. Truth usually is the same old 
story.
   -- Margaret Thatcher
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKW2CxAAoJECuveozR/AWeKGcP/28HkffsoEabQ8RnlKpbl1d0
X0cVXdBvRQB7J6lHLlb5yn53AcBdyPieqFhUx6OHikbWaVNiM2dMZ8gLb2s2L1Km
56w3MR/9L2Qqb4qiDyZt4/7mY3KQAN8cdE+NbUcnt0o5pL4vvvJ1uh4kjjlQ1X15
gfibveTOYnUDB6dI2ZpAlvLo+IKi0NpEZd3EF5GOjUcyamnAurnupbB/nOTD6ysw
oSj237fbWFKHCwFdPmIJvuVhJ4EjtnGaOLhfK7XUJF3E63EHyuYpuXrXRC9IeOUu
BMn2c22jX8Hc1XKnZ8qJzwiM/WekidZSUXhugZlOrpnOvW0qhKHB1wtXSAGs0ZJK
GkicZ+vshqOmuCxlb6lvdWX+8y3zKdRv2913yqYRg9kDq4UP8xhOX1eLsYV6w9Am
KDGkyVpsziEoXP86TrsDKkLSKWUAIjZpUZzE7zoZi0/jChdwCT1ZM0deIxhHzt26
IDe/W8yqcGb5VJKB56t2A/TUyhO2Esqlu2fR/bjUT3CuPdo3Ft96MzQnsulEwll3
20OYoolvBucYWGx97dZIx5c/R05pFI5UZp8CXlx2LbDwXFYm8q5ZGkhGM9fjTYga
2lTDXrH4f1jIRSQdVKIxsPti9uCkUqDmZurSeJNQn7F9kL59IRRWXuj8WAFKsGuX
M+KEUuJNJvWRtyPqpbRS
=ai1H
-END PGP SIGNATURE-


Re: Several Mutt usage question

2009-07-13 Thread Paul Grinberg
Kyle,

Thank you,

so far I removed charset definition, and it started to show this one. So 

Date: Sat, 11 Jul 2009 08:19:23 +0400
From: п░п╩п╣п╨я│п╟пҐпЄя─ п⌠я─п╦пҐп╠п╣я─пЁ j...@bk.ru
Subject: Re: Contacts

піп╣п╩я┐я▌


[pgrinb...@panther ~]$ locale -a | egrep ru|he
hebrew
he_IL
he_IL.iso88598
he_IL.utf8
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8
[pgrinb...@panther ~]$


Passed on perl trick
[pgrinb...@panther ~]$ perl -e 
[pgrinb...@panther ~]$



Now I am thinkingmaybe it lacks fonts?

Best,
Paul


-Original Message-
From: owner-mutt-us...@mutt.org [mailto:owner-mutt-us...@mutt.org] On Behalf Of 
Kyle Wheeler
Sent: Monday, July 13, 2009 12:29 PM
To: mutt-users@mutt.org
Subject: Re: Several Mutt usage question

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Monday, July 13 at 11:30 AM, quoth Paul Grinberg:
2) I have following in my .muttrc

set charset=koi8-r

This is pretty standard advice on this mailing list by now, but it's 
always worth repeating:

 Do not set $charset yourself.

It is (almost) always the wrong thing to do. The mutt manual includes 
a note that says $charset should only be set in case Mutt isn't abled 
[sic] to determine the character set used correctly. That isn't 
sufficiently emphatic. Mutt is virtually always able to determine the 
correct character set based on your system environment (i.e. LANG 
and/or LC_CTYPE). If mutt derives an incorrect value from those 
variables (i.e. if those variables are set up incorrectly), then LOTS  
of things are probably broken in your setup. Mutt uses lots of 
system-based string functions (such as isspace()) that do not read 
mutt's config file and rely on those environment variables to define 
the correct character set. In other words, if the environment 
variables are wrong such that mutt can't figure out the right $charset 
setting, then most of the things that mutt relies upon are probably 
not working right either.

 2) How do I read an e-mails that are in Hebrew or Russian?

 It usually displays something like this...
 \343\305\314\325\300

The answer here is somewhat long (because it depends on your system), 
so the short answer is to read http://wiki.mutt.org/?MuttFaq/Charset 
to understand what's going on.

The logic here is that if mutt displays a character in \123 form, that 
means that mutt has no idea what that character is. If mutt knows what 
the character is but thinks that the character cannot be properly 
displayed, it will replace the character with a question mark. So, the 
fact that it shows up as \343 (or some other number) means, 
essentially, that mutt doesn't know whether that character is 
printable or not, which boils down to: you have messed up your 
$charset setting. Let mutt detect that setting automatically, and it 
will probably get the correct value all by itself. If mutt gets the 
wrong value (or if mutt is still unable to display Hebrew and Russian 
emails), then your environment variables (which mutt and most of the 
rest of your system rely on) are probably incorrect.

To start with, you probably want to make sure that you don't have any 
LC_* variables set (e.g. LC_CTYPE). The primary way to fuss with this 
stuff is to use the LANG environment variable. My guess is that the 
setting in /etc/sysconfig/i18n is correct unless you don't want things 
to be in English.

To find out what values your system supports for the LANG variable, 
run this command:

 locale -a

That will print out a whole bunch, but the value you have 
(en_US.UTF-8) ought to be in that list. Note that capitalization and 
hyphenation MATTERS, so utf8 is not the same as UTF-8 or utf-8 (yes, I 
know that seems pretty stupid).

To prove to yourself that your locales (in other words, the LANG 
variable) are set up correctly, use the perl trick:

 perl -e 

If your locales are set up correctly, that should do nothing and print 
nothing, but if they're wrong it should complain loudly. To prove that 
it would normally complain, try this:

 env LANG=doesnotexist perl -e 

Often times, just getting this right (and removing the set 
charset=... nonsense from your muttrc) is enough to magically fix 
your mutt display problems. If it doesn't, then something else is set 
up improperly, and we'll be able to figure it out based on what the 
symptoms are at that point.

~Kyle
- -- 
Of course it's the same old story. Truth usually is the same old 
story.
   -- Margaret Thatcher
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKW2CxAAoJECuveozR/AWeKGcP/28HkffsoEabQ8RnlKpbl1d0
X0cVXdBvRQB7J6lHLlb5yn53AcBdyPieqFhUx6OHikbWaVNiM2dMZ8gLb2s2L1Km
56w3MR/9L2Qqb4qiDyZt4/7mY3KQAN8cdE+NbUcnt0o5pL4vvvJ1uh4kjjlQ1X15
gfibveTOYnUDB6dI2ZpAlvLo+IKi0NpEZd3EF5GOjUcyamnAurnupbB/nOTD6ysw
oSj237fbWFKHCwFdPmIJvuVhJ4EjtnGaOLhfK7XUJF3E63EHyuYpuXrXRC9IeOUu
BMn2c22jX8Hc1XKnZ8qJzwiM/WekidZSUXhugZlOrpnOvW0qhKHB1wtXSAGs0ZJK

Re: Several Mutt usage question

2009-07-13 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Monday, July 13 at 12:41 PM, quoth Paul Grinberg:
Thank you,

so far I removed charset definition, and it started to show this one. So 

Date: Sat, 11 Jul 2009 08:19:23 +0400
From: п░п╩п╣п╨я│п╟пҐпЄя─ п⌠я─п╦пҐп╠п╣я─пЁ j...@bk.ru
Subject: Re: Contacts

піп╣п╩я┐я▌

Interesting! That shows up as jibberish to me, but we're obviously 
making some progress.

[pgrinb...@panther ~]$ locale -a | egrep ru|he
hebrew
he_IL
he_IL.iso88598
he_IL.utf8
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8

Huh; so your system prefers the utf8 style, but your LANG uses 
UTF-8? I wonder if the difference is mucking anything up... I'm 
guessing that your system supports en_US.utf8, right? Try setting LANG 
to that.

Passed on perl trick
[pgrinb...@panther ~]$ perl -e 

That's always a good sign.

Now I am thinkingmaybe it lacks fonts?

Actually, my next thought (assuming that changing LANG to en_US.utf8 
doesn't fix things) is to question your terminal. What are you using?

For example, if you use an xterm, for some reason the utf-8 mode is 
not enabled by default. But they usually provide a wrapper script 
called uxterm that will launch xterm with the proper flags to enable 
utf-8 mode. That makes it so that your terminal can recognize the 
characters it is being asked to display and can look for the correct 
glyph in the font that it's using.

If your terminal is set up so that it can recognize the utf-8 
characters that mutt is emitting, then after that we'll want to look 
at your fonts.

Here's a way of testing whether your terminal and/or fonts can handle 
Russian characters:

 perl -e 'print \xD0\x91\n'

That should print a single Russian character (I don't know what the 
name of it is, but it looks like a lowercase b with a flat line across 
the top).

And here's a test for Hebrew:

 perl -e 'print \xD7\xAA\n'

That should print out a Tav (I think that's what it's called).

If those don't work, then your terminal and/or your font may not be 
working. If those DO work, but mutt doesn't, then there's probably 
something wrong with your terminal library (e.g. ncurses) and you'll 
probably want to ensure that mutt is using ncursesw instead of plain 
old ncurses (that's the ncurses variant that supports utf-8).

~Kyle
- -- 
Difference of opinion leads to enquiry, and enquiry to truth; and 
that, I am sure, is the ultimate and sincere object of us both. We 
both value too much the freedom of opinion sanctioned by our 
Constitution, not to cherish its exercise even where in opposition to 
ourselves.
 -- Thomas Jefferson to P.H. Wendover, 1815
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKW2tZAAoJECuveozR/AWenyoQAIi4BXzPS8aVFJXBAqIZNA6S
Q3WDDHcerhK8Ls/XdUH7YNLq466GGFjCAReoo+Jq9N9B5X7NiqoSEt+Hx7QQSF8Q
GyPGOMlNG7lrk2AtMlYct2/mev3F0Clskhe92Ab7G3zaky0PV2HpK2Byx7t9Ru8/
lphbceV6PTQ9R+fQ2p8FnIQwqZtnA+YJ5GZmbMCr2OjtdH+6cxgnWtvKRQRI1gIY
hK03J6C9o/BtjTxTeXnSuKdv/jcLZi0xTY18TFY86qJ+zkHI/vzllS22osgWxUWI
gJ2o6mdFOJptZtNRk5CxGve6dJG3x3DTKf7nlGwEd/ew4X04bN4RkJg9dCsntjJY
fmjz6GfsjjW2hGSVZwKq9PEctc5hDnXiTnBgxGYDyDyTa0a1b6ZaJ2CX9aAGcxlf
kn1ABpZvkhFtZ0gSKh/hCfCOiAS/cooKfbmA1TA/Vm+uVYsZvIOr5wmdkhe6D/DM
mIe7cT/ih8IGq5EF3qmWRPm00kDnCGLro+hIZwwwzwJ1hDZ0fph4qu04eGP7eWao
MTsC+gRxf+dkp6zRxAUSg3MItHBSETKG6xwfLUVhHFdCXHU4qpvViAHox1qRfwG+
/zLFcHxog/YBta7q5VOcslI8u/DaYmW5MIPHzd/pqsxV5PNr3KEqpPNJpnefG5Nk
cnKxjf3bVPEfJv0CZCuw
=2oMN
-END PGP SIGNATURE-


Re: Several Mutt usage question

2009-07-13 Thread Paul Grinberg
Kyle,

You are absolutely right!

Terminal is incapable of handling these chars...

[pgrinb...@panther ~]$ perl -e 'print \xD0\x91\n'
п▒
[pgrinb...@panther ~]$ perl -e 'print \xD7\xAA\n'
в╙
[pgrinb...@panther ~]$

Do you know how to set it to use proper fonts?

As I said I have these 

[r...@panther pgrinberg]# cat /etc/sysconfig/i18n
LANG=en_US.UTF-8
SYSFONT=latarcyrheb-sun16


Btw, thank you for the explanation  I feel I really learned something today 
:) Liked Perl checks! :)

Best,
Paul


-Original Message-
From: owner-mutt-us...@mutt.org [mailto:owner-mutt-us...@mutt.org] On Behalf Of 
Kyle Wheeler
Sent: Monday, July 13, 2009 1:14 PM
To: mutt-users@mutt.org
Subject: Re: Several Mutt usage question

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Monday, July 13 at 12:41 PM, quoth Paul Grinberg:
Thank you,

so far I removed charset definition, and it started to show this one. So 

Date: Sat, 11 Jul 2009 08:19:23 +0400
From: п░п╩п╣п╨я│п╟пҐпЄя─ п⌠я─п╦пҐп╠п╣я─пЁ j...@bk.ru
Subject: Re: Contacts

піп╣п╩я┐я▌

Interesting! That shows up as jibberish to me, but we're obviously 
making some progress.

[pgrinb...@panther ~]$ locale -a | egrep ru|he
hebrew
he_IL
he_IL.iso88598
he_IL.utf8
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8

Huh; so your system prefers the utf8 style, but your LANG uses 
UTF-8? I wonder if the difference is mucking anything up... I'm 
guessing that your system supports en_US.utf8, right? Try setting LANG 
to that.

Passed on perl trick
[pgrinb...@panther ~]$ perl -e 

That's always a good sign.

Now I am thinkingmaybe it lacks fonts?

Actually, my next thought (assuming that changing LANG to en_US.utf8 
doesn't fix things) is to question your terminal. What are you using?

For example, if you use an xterm, for some reason the utf-8 mode is 
not enabled by default. But they usually provide a wrapper script 
called uxterm that will launch xterm with the proper flags to enable 
utf-8 mode. That makes it so that your terminal can recognize the 
characters it is being asked to display and can look for the correct 
glyph in the font that it's using.

If your terminal is set up so that it can recognize the utf-8 
characters that mutt is emitting, then after that we'll want to look 
at your fonts.

Here's a way of testing whether your terminal and/or fonts can handle 
Russian characters:

 perl -e 'print \xD0\x91\n'

That should print a single Russian character (I don't know what the 
name of it is, but it looks like a lowercase b with a flat line across 
the top).

And here's a test for Hebrew:

 perl -e 'print \xD7\xAA\n'

That should print out a Tav (I think that's what it's called).

If those don't work, then your terminal and/or your font may not be 
working. If those DO work, but mutt doesn't, then there's probably 
something wrong with your terminal library (e.g. ncurses) and you'll 
probably want to ensure that mutt is using ncursesw instead of plain 
old ncurses (that's the ncurses variant that supports utf-8).

~Kyle
- -- 
Difference of opinion leads to enquiry, and enquiry to truth; and 
that, I am sure, is the ultimate and sincere object of us both. We 
both value too much the freedom of opinion sanctioned by our 
Constitution, not to cherish its exercise even where in opposition to 
ourselves.
 -- Thomas Jefferson to P.H. Wendover, 1815
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKW2tZAAoJECuveozR/AWenyoQAIi4BXzPS8aVFJXBAqIZNA6S
Q3WDDHcerhK8Ls/XdUH7YNLq466GGFjCAReoo+Jq9N9B5X7NiqoSEt+Hx7QQSF8Q
GyPGOMlNG7lrk2AtMlYct2/mev3F0Clskhe92Ab7G3zaky0PV2HpK2Byx7t9Ru8/
lphbceV6PTQ9R+fQ2p8FnIQwqZtnA+YJ5GZmbMCr2OjtdH+6cxgnWtvKRQRI1gIY
hK03J6C9o/BtjTxTeXnSuKdv/jcLZi0xTY18TFY86qJ+zkHI/vzllS22osgWxUWI
gJ2o6mdFOJptZtNRk5CxGve6dJG3x3DTKf7nlGwEd/ew4X04bN4RkJg9dCsntjJY
fmjz6GfsjjW2hGSVZwKq9PEctc5hDnXiTnBgxGYDyDyTa0a1b6ZaJ2CX9aAGcxlf
kn1ABpZvkhFtZ0gSKh/hCfCOiAS/cooKfbmA1TA/Vm+uVYsZvIOr5wmdkhe6D/DM
mIe7cT/ih8IGq5EF3qmWRPm00kDnCGLro+hIZwwwzwJ1hDZ0fph4qu04eGP7eWao
MTsC+gRxf+dkp6zRxAUSg3MItHBSETKG6xwfLUVhHFdCXHU4qpvViAHox1qRfwG+
/zLFcHxog/YBta7q5VOcslI8u/DaYmW5MIPHzd/pqsxV5PNr3KEqpPNJpnefG5Nk
cnKxjf3bVPEfJv0CZCuw
=2oMN
-END PGP SIGNATURE-


Re: Several Mutt usage question

2009-07-13 Thread Paul Grinberg
Kyle,

Also, I don't remember trying it through GUI. I am always working through 
ssh...so I guess the fonts that I have defined in n18i are for GUI based 
console session, and they don't exist in ssh session.

Best,
Paul


-Original Message-
From: owner-mutt-us...@mutt.org [mailto:owner-mutt-us...@mutt.org] On Behalf Of 
Kyle Wheeler
Sent: Monday, July 13, 2009 1:14 PM
To: mutt-users@mutt.org
Subject: Re: Several Mutt usage question

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Monday, July 13 at 12:41 PM, quoth Paul Grinberg:
Thank you,

so far I removed charset definition, and it started to show this one. So 

Date: Sat, 11 Jul 2009 08:19:23 +0400
From: п░п╩п╣п╨я│п╟пҐпЄя─ п⌠я─п╦пҐп╠п╣я─пЁ j...@bk.ru
Subject: Re: Contacts

піп╣п╩я┐я▌

Interesting! That shows up as jibberish to me, but we're obviously 
making some progress.

[pgrinb...@panther ~]$ locale -a | egrep ru|he
hebrew
he_IL
he_IL.iso88598
he_IL.utf8
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8

Huh; so your system prefers the utf8 style, but your LANG uses 
UTF-8? I wonder if the difference is mucking anything up... I'm 
guessing that your system supports en_US.utf8, right? Try setting LANG 
to that.

Passed on perl trick
[pgrinb...@panther ~]$ perl -e 

That's always a good sign.

Now I am thinkingmaybe it lacks fonts?

Actually, my next thought (assuming that changing LANG to en_US.utf8 
doesn't fix things) is to question your terminal. What are you using?

For example, if you use an xterm, for some reason the utf-8 mode is 
not enabled by default. But they usually provide a wrapper script 
called uxterm that will launch xterm with the proper flags to enable 
utf-8 mode. That makes it so that your terminal can recognize the 
characters it is being asked to display and can look for the correct 
glyph in the font that it's using.

If your terminal is set up so that it can recognize the utf-8 
characters that mutt is emitting, then after that we'll want to look 
at your fonts.

Here's a way of testing whether your terminal and/or fonts can handle 
Russian characters:

 perl -e 'print \xD0\x91\n'

That should print a single Russian character (I don't know what the 
name of it is, but it looks like a lowercase b with a flat line across 
the top).

And here's a test for Hebrew:

 perl -e 'print \xD7\xAA\n'

That should print out a Tav (I think that's what it's called).

If those don't work, then your terminal and/or your font may not be 
working. If those DO work, but mutt doesn't, then there's probably 
something wrong with your terminal library (e.g. ncurses) and you'll 
probably want to ensure that mutt is using ncursesw instead of plain 
old ncurses (that's the ncurses variant that supports utf-8).

~Kyle
- -- 
Difference of opinion leads to enquiry, and enquiry to truth; and 
that, I am sure, is the ultimate and sincere object of us both. We 
both value too much the freedom of opinion sanctioned by our 
Constitution, not to cherish its exercise even where in opposition to 
ourselves.
 -- Thomas Jefferson to P.H. Wendover, 1815
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKW2tZAAoJECuveozR/AWenyoQAIi4BXzPS8aVFJXBAqIZNA6S
Q3WDDHcerhK8Ls/XdUH7YNLq466GGFjCAReoo+Jq9N9B5X7NiqoSEt+Hx7QQSF8Q
GyPGOMlNG7lrk2AtMlYct2/mev3F0Clskhe92Ab7G3zaky0PV2HpK2Byx7t9Ru8/
lphbceV6PTQ9R+fQ2p8FnIQwqZtnA+YJ5GZmbMCr2OjtdH+6cxgnWtvKRQRI1gIY
hK03J6C9o/BtjTxTeXnSuKdv/jcLZi0xTY18TFY86qJ+zkHI/vzllS22osgWxUWI
gJ2o6mdFOJptZtNRk5CxGve6dJG3x3DTKf7nlGwEd/ew4X04bN4RkJg9dCsntjJY
fmjz6GfsjjW2hGSVZwKq9PEctc5hDnXiTnBgxGYDyDyTa0a1b6ZaJ2CX9aAGcxlf
kn1ABpZvkhFtZ0gSKh/hCfCOiAS/cooKfbmA1TA/Vm+uVYsZvIOr5wmdkhe6D/DM
mIe7cT/ih8IGq5EF3qmWRPm00kDnCGLro+hIZwwwzwJ1hDZ0fph4qu04eGP7eWao
MTsC+gRxf+dkp6zRxAUSg3MItHBSETKG6xwfLUVhHFdCXHU4qpvViAHox1qRfwG+
/zLFcHxog/YBta7q5VOcslI8u/DaYmW5MIPHzd/pqsxV5PNr3KEqpPNJpnefG5Nk
cnKxjf3bVPEfJv0CZCuw
=2oMN
-END PGP SIGNATURE-


Re: Several Mutt usage question

2009-07-13 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Monday, July 13 at 01:24 PM, quoth Paul Grinberg:
You are absolutely right!

;)

Terminal is incapable of handling these chars...

[pgrinb...@panther ~]$ perl -e 'print \xD0\x91\n'
п▒
[pgrinb...@panther ~]$ perl -e 'print \xD7\xAA\n'
в╙

Huh. That's unfortunate.

Do you know how to set it to use proper fonts?

Sorry, I can't help you there. I have no experience at all with 
fiddling with terminal fonts. I can tell you that my Ubuntu install 
with Gnome-Terminal correctly prints those characters using the system 
fixed width font (which is, I believe, called Monospace), and a 
uxterm also prints the correct characters using the default font. But 
I have no idea how I installed the right fonts (it's pretty much just 
a default setup).

Btw, thank you for the explanation  I feel I really learned 
something today :) Liked Perl checks! :)

Happy to help!

~Kyle
- -- 
No man has a natural right to commit aggression on the equal rights of 
another, and this is all from which the laws ought to restrain him.
  -- Thomas Jefferson, July 7, 1786
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKW3SsAAoJECuveozR/AWemLgQAJLjG0Svfk/E3YY3VzmFPt00
T0zAyiCQ0dTU7i/clu2FKxo9CPI7lO0xWEvt9qTEIanwWq9xcDVa+eGV+Mj/IHEf
IEvngm4MfG68bLXV4sHVOYCjPV+m6/eqZjfGs/yfXKR1TsrXSZpN2rtNCrp4lV1Q
m1sW5w8ebh0UAQ9qjBd4C+ucmL9rTH9GyUWye6OOM7KT3a8txHGTHf5uGtadT7f+
W25D2ln+/3O5hWvphubdUG3lPBGcm9mjNrtU9sk+3fHVTARJtdmZdPe94kKJjsGa
7M0r9G2XvfFEA8RBlLg0NOEoNoUXclhMfJ536e0J3EVIScrNbtebW3yGv7kmptAz
FfbzewUgDtofBzZLnuMGn/hv4zO23PI79RmSJI3BMrd1p2eRTHsuT6ebDVRuI8UF
fv+JJ1rozgmbLtXLCmw/SKJnPYd/l3wRgO7RNj9tFrjsjNLhc37TPj+WTYy7umI7
UtTQRhB9s0YiJT7wLQoB0Snz7+zg521Tv+IEUOB0N5fjNK+o8ej/F6MNyHYSmnsi
pZ56HkmYqG85byT4JVHqVcde0KQnmQafCNER/UuBqJa8ELVEX+46X3gw7Sg5BC/b
ceWaozuYDvbWnqcqYwrelFflQ09FJcue1QuFysecLY7mw+hPXXoLa647j6mcdhI0
IeIA/CrI/sxfgTO5e1/l
=O9tZ
-END PGP SIGNATURE-


Re: Several Mutt usage question

2009-07-13 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Monday, July 13 at 01:32 PM, quoth Paul Grinberg:
 Also, I don't remember trying it through GUI. I am always working 
 through ssh...so I guess the fonts that I have defined in n18i are 
 for GUI based console session, and they don't exist in ssh session.

Well, put it this way - unless something funky is going on, the remote 
system is NOT sending fonts to you to use. It's just sending you 
character codes which your terminal then has to figure out how to 
display. So the fonts to display Hebrew or Russian must be installed 
LOCALLY. For example, if I use my Mac's Terminal.app to ssh into my 
Linux box and run mutt, everything will be displayed using my Mac's 
fonts. And if I use my Linux box to ssh into my Mac, everything will 
be displayed using my Linux fonts. The same is true if I start in 
Linux and ssh to a Linux box: the display is on the local system, so 
that's where the fonts have to be.

(Consider, for example, the difference between ssh and VNC. VNC shows 
you the REMOTE COMPUTER's screen, so everything, including the fonts, 
is generated by the remote computer. For this reason, there's a LOT of 
data being transferred to you from the remote computer, and VNC is 
usually very slow. SSH, on the other hand, is much faster because it's 
not transmitting nearly as much stuff: just the character codes. The 
display (i.e. answering the question how should I draw the letter 
'a'?) is done locally.

~Kyle
- -- 
A wise man changes his mind, a fool never.
 -- Spanish proverb
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKW3epAAoJECuveozR/AWeBOYQAIyhtG0wpBDKMe5I/W36L0wh
ics/9U4m3//eOWUeawJIiM3ErovYtphwz878stMXwVtNezcIbf0bhjs/WuPaJ6ip
lt+c1nwrN2NJKj5C4+ACVcRFP/IuNEW5swXwdq3DKBHeBHzAYQLlfsu41BmsRMUg
5ke5D8v497YW6JbpWi6VVlg9ejd1gzhMZs33p0VEwpahzLGX81kgf86ejq6qDDPD
sf3mz8PyXsy3vtGDaxtaMM2AC4ZZqzSJtLvxv+QCwcu6hNOouAlEUBq9qyiEcuZv
mGSMEYMW+hPu2ov/BKWoMJJ8NzRb9+P4Lax+b1dCsOnKfXqEeoLeulM8SZLYyp1X
o4G2CmlqNpn8XFxD6SoPc/be1TeE+Qnfi+V/XdJ/EXymmX2REgX7JLoWproADbaK
MQ10wnCTMpBwIl9qiEjaZs2zBjLij0cDQ+WTMbk4YdRHb3sgBR8vb4EFQBzrk8e6
J5SK6FkimLhqIa/yV+IppFHa8nezgFOQ7ZA1Kw8Qwx7KxWtrGc32D4fblW1dbjme
KiyTMqVEY7ws6ExRj3UEIrcsM0qOwZqH9z1yUd/AuZkQBbCcZ08UtBDTaaYSq+07
OReDq6SFryZ1cpU1YtQrGzSoHaMBOSE2ewnaYYeX2iTNoJUtuoIDcZ7XXJzZJXqC
niJ376xbRYY+lT9er01c
=YDRy
-END PGP SIGNATURE-


Re: Several Mutt usage question

2009-07-13 Thread Paul Grinberg
Derek, Kyle,

I got it working! Thank you very much!

Putty - Load desired profile - Window - Translations

Change Received data - to - UTF-8

Both Hebrew and Russian will work !!!  and it is from right to left :)




Best,
Paul


-Original Message-
From: Derek Martin [mailto:inva...@pizzashack.org] 
Sent: Monday, July 13, 2009 2:11 PM
To: Paul Grinberg
Cc: Kyle Wheeler; mutt-users@mutt.org
Subject: Re: Several Mutt usage question

On Mon, Jul 13, 2009 at 01:24:36PM -0400, Paul Grinberg wrote:
 Do you know how to set it to use proper fonts?
 As I said I have these 
 
 [r...@panther pgrinberg]# cat /etc/sysconfig/i18n LANG=en_US.UTF-8
 SYSFONT=latarcyrheb-sun16

I'm unfamiliar with the $SYSFONT variable, but a quick search suggests
that this controls the font that is used on the system console (i.e.
in text mode, with no X window system).  It seems unrleated to your
problem.

How to control the font depends on the terminal program you are using.
If you're using gnome-terminal, it mostly should just work for you out
of the box.  If you've selected a specific font, that may actually break
it for you.

On xterm and older programs, you need to specify the font using an X
resource.  For example, I like to use the Universal font:

XTerm*font: -misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-*

Add that to $HOME/.Xdefaults, and then run the following:

 $ xrdb -merge ~/.Xdefaults
 $ xterm 

Now, in the new xterm that you just started, run Mutt.  It should
display properly, if you have the right fonts installed.  If you don't
have the right fonts installed, you'll either get a different font that
matches that name but doesn't have all the unicode characters present,
or you'll get an error about X finding no matching fonts, and using
fixed instead.

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will
result in undeliverable mail due to spam prevention.  Sorry for the
inconvenience.



Re: Several Mutt usage question

2009-07-13 Thread Derek Martin
On Mon, Jul 13, 2009 at 01:24:36PM -0400, Paul Grinberg wrote:
 Do you know how to set it to use proper fonts?
 As I said I have these 
 
 [r...@panther pgrinberg]# cat /etc/sysconfig/i18n
 LANG=en_US.UTF-8
 SYSFONT=latarcyrheb-sun16

I'm unfamiliar with the $SYSFONT variable, but a quick search suggests
that this controls the font that is used on the system console (i.e.
in text mode, with no X window system).  It seems unrleated to your
problem.

How to control the font depends on the terminal program you are using.
If you're using gnome-terminal, it mostly should just work for you
out of the box.  If you've selected a specific font, that may actually
break it for you.

On xterm and older programs, you need to specify the font using an X
resource.  For example, I like to use the Universal font:

XTerm*font: -misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-*

Add that to $HOME/.Xdefaults, and then run the following:

 $ xrdb -merge ~/.Xdefaults
 $ xterm 

Now, in the new xterm that you just started, run Mutt.  It should
display properly, if you have the right fonts installed.  If you don't
have the right fonts installed, you'll either get a different font
that matches that name but doesn't have all the unicode characters
present, or you'll get an error about X finding no matching fonts, and
using fixed instead.

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpGQpEYGKKst.pgp
Description: PGP signature