FAQ about patches | More patches | Main Page

UTF-8 patch for Pine
Versions of pine the patch is available for: pine 4.58 pine 4.61 pine 4.64
 
This patch was submitted by Bernhard Kaindl.
 
This patch is based on a patch by Jungshik Shin and can be used as an universal charset translation patch for pine, it can translate beween any encodings supported by iconv()

UTF-8 is one of the charsets supported by iconv but the patch translates beween any pairs supported by iconv, so you can have your display terminal configured for the encoding you want and let the patch use iconv() to convert all mail to this encoding.

The patch also introduces a pine config setting called send-charset which allows pine users to set a charset to which all composed, forwarded and replyed mail should be converted to, independent of which terminal charset you use at the moment. This feature has been disabled in the patch in version 4.61 and 4.64.

Configuration:

  • It's not needed to do anything. If you do nothing, pine will just work as usual, the only thing you'll notice that you'll see mails encoded in character sets which are not supported by standard pine(such as UTF-8) should be handled properly now, provided that the characters in the mails you receive have an represenation in the character set you use so that they can be converted.

    If it's not possible to convert characters, the hex codes are displayed in hexadecimal coding like this: [e9][fg]. The behavior in version 4.64 is different, though, you will see question marks instead.

Notes for users who want to configure UTF-8 as terminal charset:

  • Recent Linux Distributions, will use an locale UTF-8 by default, if it does not, you get an xterm which UTF-8 support by entering in X:
    	LANG=en_US.UTF-8 xterm

Compilation:

This patch should work on most modern Linux Distributions and any system where you have an implementation of iconv (e.g. Solaris) and all systems where you can install one. On Linux, you just build pine as ususal, the patch will be actived by default.
 
On Solaris and other systems use:
 
./build EXTRACFLAGS="-DHAVE_ICONV" target
 
The patch uses a define called HAVE_ICONV which indicates if the iconv() library call which is available on this system. If iconv is not provided by the system, one of three freely available implementations can be used.
 
The original patch from Jungshik Shin sent with documentation, the display-filters described are obsolete now:
 
http://mail.nl.linux.org/linux-utf8/2002-07/msg00012.html
 
Free implementation of iconv, if your system doesn't provide one:
 
libiconv like in Linux glibc:
http://www.gnu.org/software/libiconv/
 
The portable iconv implementation by Bruno Haible:
ftp://ftp.ilog.fr/pub/Users/haible/gnu/libiconv-1.5.1.tar.gz
 
The portable iconv implementation by Konstantin Chuguev:
ftp://ftp.urc.ac.ru/pub/local/OS/Unix/converters/iconv-0.4.tar.gz

Last Updated Mon Oct 6 13:56:43 CEST 2003