Subject: [sup-talk] Sup on Windows

From: [email-masked] (Christopher Warrington)
Date: Mon, 8 Oct 2007 04:28:51 -0500 (CDT)

I can get Sup to work on Windows using cygwin, but it doesn't handle 
UTF-8 messages properly (or so it seems). Has anyone gotten sup to work 
with a native install of Ruby on Windows?

I've tried, but I can't get the ncurses gem to compile and install.

(A similar questions is cross-posted to the ruby-talk mailing list.)

-- 
Christopher Warrington <chrisw at rice.edu>
(Away from his normal computer.)

---

From: [email-masked] (William Morgan)
Date: Mon, 08 Oct 2007 14:38:25 -0700

Excerpts from Christopher Warrington's message of Mon Oct 08 02:28:51
-0700 2007:
> I can get Sup to work on Windows using cygwin,

Wow!

> but it doesn't handle UTF-8 messages properly (or so it seems).

The UTF-8 support is pretty wonky, even on Linux, because ncurses
doesn't really support wide characters. There's a ncursesw, but no Ruby
wrapper for it except for something from 2005 which I haven't had to
energy to play with yet.

In my setup, I can see most European and accented characters fine, but
anything else displays as garbage.

-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Christopher Warrington)
Date: Tue, 9 Oct 2007 14:33:52 -0500

William Morgan @ 2007-10-09 8:38:51 AM
"[sup-talk] Sup on Windows" <mid:1191936765-sup-4487 at south>

> [cc'ing list, hope you don't mind]

No, I don't. The first one was not meant as a PM. I screwed up.

>> Here's a screenshot: http://www.chriswarrington.com/sup_win.png
> Weird, why are all the sender names missing?

I imported those messages from the list archive, so they are not in
the proper mbox format. The e-mail addresses are munged such that
a at b.tld becomes a at b.tld. In other words, not a bug.

>> I was getting lots of errors like these when importing my archive:
>> [Tue Oct 09 01:51:05 -0500 2007] warning: error decoding message body from
>> "us-ascii": invalid encoding ("utf-8", ""us-ascii"")
> This sounds like iconv is being stubborn. Can you do this?
>   $ irb -riconv
>   >> Iconv.iconv "utf-8", "us-ascii", "hello there" 
>   => ["hello there"]

It seems to work:
$ irb -riconv
irb(main):001:0> Iconv.iconv "utf-8", "us-ascii", "hello there"
=> ["hello there"]
irb(main):002:0> Iconv.iconv  "us-ascii", "utf-8", "hello there"
=> ["hello there"]
irb(main):003:0> Iconv.iconv  "us-ascii", "iso-8859-15", "hello there"
=> ["hello there"]
irb(main):004:0> Iconv.iconv  "iso-8859-15", "utf-8", "hello there"
=> ["hello there"]
irb(main):005:0> Iconv.iconv  "iso-8859-15", "us-ascii", "hello there"
=> ["hello there"]
irb(main):006:0> Iconv.iconv  "us-ascii", "iso-8859-15", "hello there"
=> ["hello there"]

"When in doubt, use brute force."
-Ken Thompson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 183 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071009/367c7513/attachment.bin