<<< Date Index >>>     <<< Thread Index >>>

Re: howto get mutt to display "circled numbers"



 On Saturday, July 15, 2006 at 16:53:53 +0900, Henry Nelson wrote:

> you never cease to amaze me how you find things out.

    Thanks! Problems I prefer are those that learn me something. ;-)


> I changed to `` set charset="euc-jp-ms" '' in .muttrc, and now I see
> the "correct rendering" of the body
>| ?? 構造検索の強化
>| ?? 反応検索の強化

    But you can't send them: Characters  and  were changed each to a
pair of question marks in your EUC-JP mail.


>> Break iconv for those mails
> Is this what I did in essence?

    Yes: You broke iconv from the other end. But setting an /unknown/
$charset you broke *all* iconv operations: No more 2022-JP subjects, no
more UTF-8 nor Latin mails, no more anything. Only correct are those
mails that happen to match your terminal. EUC-JP(-MS) only.

    My dirty hack ($charset=euc-jp and charset-hook ^euc-jp$ /unknown/)
breaks iconv exclusively for those EUC-JP mails. You see them right, and
still right "がリ" subject, and right everything else.


>> Conclusion: You'd better find a way to iconv EUC-JP-MS.
> Maybe I'll write to Bruno Haible to see if he can help.

    Please do! But it might come faster than you fear: It already does
work here! ;-) I write this on a fully functional EUC-JP-MS setup.

    Google states that a Japanese patch to libiconv exists at
<URL:http://www2d.biglobe.ne.jp/~msyk/software/libiconv-patch.html>. It
was crafted by Masayuki MORIYAMA, also contributor of some Mutt patches
like patch-1.5.8.msyk.iconvhook.1. I can't read Japanese, but downloaded
libiconv-1.10-cp932.patch.gz, and rebuilt libiconv. Now:

| $ iconv -l | grep EUC-JP-MS
| EUC-JP-MS EUCJP-MS EUCJP-OPEN EUCJP-WIN
|
| $ printf "\xAD\xA1\n" | iconv -f euc-jp-ms -t c99
| \u2460
|
| $ printf "\\\\u2460\n" | iconv -f c99 -t euc-jp-ms
| 
|
| $ printf "\xAD\xA1\n" | iconv -f euc-jp-ms -t euc-jp
| iconv: (stdin):1:0: cannot convert
|
| $ printf "\xAD\xA1\n" | iconv -f euc-jp-ms -t euc-jp//TRANSLIT
| (1)

    I also built an adapted locale:

| # localedef -i fr_FR -f EUC-JP-MS  fr_FR.euc-jp-ms
|
| $ export LANG=fr_FR.euc-jp-ms
|
| $ locale charmap
| EUC-JP-MS

    Interestingly Mutt 1.5.12 canonicalizes this to:

| :set &charset ?charset
| charset="eucJP-ms"

    While the choosen $send_charset is downcased: "eucjp-ms". Muttrc:

| charset-hook ^euc-jp$ euc-jp-ms       # Once euc-jp-ms known to iconv,
|                                       # this is a clean solution;
|                                       # Not a "dirty hack" anymore. ;-)
| set 
send_charset="us-ascii:iso-8859-1:iso-8859-15:windows-1252:iso-8859-2:windows-1250:iso-2022-jp:euc-jp;euc-jp-ms:utf-8"


    And I can now read, compose, and hopefully send properly both a
(one) and a (TM). Let's see:  ™. Furthermore this setup is clean
enough to work as well in an UTF-8 locale.


Bye!    Alain.
-- 
Mutt 1.5.12 is released.