Subject: [sup-talk] sup and ncursesw

From: [email-masked] (Jörg-Hendrik Bach)
Date: Wed, 10 Jun 2009 19:50:49 +0200

Hi all,

I recently installed sup 0.8 and find I am having problems with umlauts and
accented characters. There is a patch for the ncurses-0.9.1 gem on the sup
wiki ("utf8-issues") which allows the characters to be displayed correctly,
but after applying the patch I can't enter proper text. Hitting 'c' for
compose works, but entering '123' for subject ends in a subject line such
as:

Subject: P<85>??P<85>???C"      ?C"

(it's a different set of confused characters each time)
Similar when searching for messages using '\' or 'L'.

I am on ubuntu 9.04 with libncursesw5{,-dev} version 5.7+20090207, sup 0.8.
Any hints?

cheers,
- J?rg-Hendrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090610/aa0a2b51/attachment.html>

---

From: [email-masked] (William Morgan)
Date: Fri, 12 Jun 2009 13:03:22 -0700

Hi J?rg-Hendrik,

Reformatted excerpts from J?rg-Hendrik Bach's message of 2009-06-10:
> I recently installed sup 0.8 and find I am having problems with
> umlauts and accented characters. There is a patch for the
> ncurses-0.9.1 gem on the sup wiki ("utf8-issues") which allows the
> characters to be displayed correctly, but after applying the patch I
> can't enter proper text.

What is your environment's character set? (Should be the first line of
output logged by Sup.) What is your terminal emulator? Do other widechar
ncurses programs work? And what's the behavior without the patch to
ncurses.so?
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Jörg-Hendrik Bach)
Date: Sat, 13 Jun 2009 16:17:51 +0200

2009/6/12 William Morgan <wmorgan-sup at masanjin.net>

> output logged by Sup.) What is your terminal emulator? And what's the
> behavior without the patch to ncurses.so?

After playing around a bit i think the behaviour might be related to a
problem with locale.
I reinstalled ruby, rubygems, ncurses and sup. No patch to ncurses this
time. Using gnome-terminal or xterm with "TERM=xterm" now lets umlauts etc
look like, e.g. "JM-CM-6rg-Hendrik"). The reported character set is "utf8".
The same happens when using urxvt with TERM=rxvt-unicode.

However, calling sup like this:
$ LC_ALL=en_GB.iso-8859-15 sup

results in different behaviour in the two emulators: xterm looks OK when
viewing the inbox, but inserts boxed question marks in thread-view.
rxvt-unicode displays everything correctly, but drops the last character of
a line when a non-ASCII element is somewhere in the line. In both variants
sup reports the character set correctly as iso-8859-15.
So I guess I could simply work in urxvt and that's OK, then.

Do other widechar ncurses programs work?

The only other ncurses-based program I am aware of using is midnight
commander, and it seems to be working fine. But I don't know whether it uses
the widechar variant.

cheers,
- J?rg-Hendrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090613/c8c73902/attachment.html>

---

From: [email-masked] (William Morgan)
Date: Mon, 15 Jun 2009 07:04:52 -0700

> After playing around a bit i think the behaviour might be related to a

Yeah, this stuff is all tricky to get working right. I recommend first
trying to get to the point where you can cat and less files with funny
characters in them, and then introduce something like Sup. (And that's
typically the point where you see the difference between ncurses.so with
and without the patch.)

> Using gnome-terminal or xterm with "TERM=xterm" now lets umlauts etc

Probably the umlauts themselves aren't in utf8. I have had success with
gnome-terminal and TERM=xterm, so I bet you can get this combo to work.
Try changing your locale from utf8 to en_GB.iso-8859-15 here (if you're
using Ubuntu, you can edit /etc/default/locale an re-log in, then
`locale` to check.)
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (William Morgan)
Date: Wed, 17 Jun 2009 09:14:56 -0700

Reformatted excerpts from William Morgan's message of 2009-06-15:
> (And that's typically the point where you see the difference between
> ncurses.so with and without the patch.)

BTW, it looks like the patch will not be necessary if we manage to move
to 1.9.1:

  http://redmine.ruby-lang.org/issues/show/975
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Jörg-Hendrik Bach)
Date: Thu, 18 Jun 2009 11:26:03 +0200

> BTW, it looks like the patch will not be necessary if we manage to move

The patch actually works for me now, and probably had been working all
the time. Whatever was screwed, after I manually redrew the screen
_twice_ after the strange chars appeared, it was all fine.
thanks for the help,
- JH