nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] mhshow complaints

2014-04-22 03:58:23
Hi Ken,

mhshow: Can't convert unicode-1-1-utf-7 to UTF-8
mhshow: unable to convert character set of part 1 to unicode-1-1-utf-7, 
continuing...

I thought that charset was mega-bogus, but it turns out that's wrong.
It's defined in RFC 2152.  We simply pass those strings directly to
iconv(), and the iconv on my system claims that it can handle that.
Although from what I read, "unicode-1-1-utf-7" is the old charset name
used in RFC 1642; RFC 2152 says you should use utf-7.

Should nmh have a second try if the first iconv fails and the charset is
in a new `alias' list?  That would handle iconvs that don't yet know
unicode-1-1-utf-7.  recode(1) has something similar IIRC.

    $ foo() { seq 32 126 | sed 's/$/P/; $s/$/10P/' | dc; }
    $ foo | fold
     
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno
    pqrstuvwxyz{|}~
    $
    $ foo | iconv -f ascii -t unicode-1-1-utf-7
    iconv: conversion to `unicode-1-1-utf-7' is not supported
    Try `iconv --help' or `iconv --usage' for more information.
    $
    $ foo | iconv -t utf-7 | fold
     
+ACEAIgAjACQAJQAm'()+ACoAKw,-./0123456789:+ADsAPAA9AD4?+AEA-ABCDEFGHIJKLMNOPQRS
    TUVWXYZ+AFsAXABdAF4AXwBg-abcdefghijklmnopqrstuvwxyz+AHsAfAB9AH4
    $
    $ foo | recode ..unicode-1-1-utf-7 | fold
     
+ACEAIgAjACQAJQAm'()+ACoAKw,-./0123456789:+ADsAPAA9AD4?+AEA-ABCDEFGHIJKLMNOPQRS
    TUVWXYZ+AFsAXABdAF4AXwBg-abcdefghijklmnopqrstuvwxyz+AHsAfAB9AH4
    $

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>