From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] System encoding versus messages encoding
Date: Tue, 22 Apr 2008 16:18:00 -0700 [thread overview]
Message-ID: <1208905597-sup-4977@south> (raw)
In-Reply-To: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com>
Reformatted excerpts from Israel Herraiz's message of 2008-04-21:
> As far as I know (considering what I have read in the documentation
> and in the archives of this mailing list), Sup determines the encoding
> using the environment variables and tries to decode all the messages
> using that encoding.
This is not correct. Sup DOES determin the message's (or MIME
component's) charset, and transcodes it to your terminal charset using
the iconv library before display. (After decoding quoted-printable,
etc.)
The problem is actually that the Ruby ncurses gem is not wide-character
aware, so dumping UTF8 to the terminal doesn't actually work. Well, it
actually does seem to work for some characters, but not most of them.
The solution has been known for quite some time, but it ain't pretty:
http://rubyforge.org/pipermail/sup-talk/2007-October/000297.html
The good news is that I've just made it slightly simpler, at least if
you're running from git. I've published an "ncursesw" branch that
contains a hacked ncurses-0.9.1 and a dirty script to install it into
your ../lib/ directory. If you use that AND you run from git next,
you'll see wide characters. It works!
So, just a "few" "simple" commands:
$ git branch --track ncursesw origin/ncursesw
$ git checkout ncursesw
$ cd ncurses-0.9.1/
$ ./run-this-for-sup.sh
$ cd ..
$ git checkout next
$ ruby -Ilib bin/sup
... and you should see wide characters, assuming your terminal is
capable. If make dies, you probably need to install some kind of
ncursesw development library. On my Debian system it's
a package called libncursesw5-dev.
A gold star to anyone who makes a nice wiki page out of this.
--
William <wmorgan-sup at masanjin.net>
next prev parent reply other threads:[~2008-04-22 23:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 20:37 Israel Herraiz
2008-04-22 11:39 ` Shot (Piotr Szotkowski)
2008-04-22 23:18 ` William Morgan [this message]
2008-04-23 0:09 ` Israel Herraiz
2008-04-23 2:03 ` William Morgan
2008-04-23 1:08 ` Israel Herraiz
2008-04-23 1:53 ` William Morgan
2008-04-24 19:36 ` Marc Hartstein
2008-04-24 23:10 ` [sup-talk] [PATCH] fixed dlopen of libc for os x Grant Hollingworth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1208905597-sup-4977@south \
--to=wmorgan-sup@masanjin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox