Hi Dorai,

> I have some some Unicode characters with codes higher than 256 (e.g.,
> smart quotes) that 'refer' chokes on with the message "invalid input
> character code".  

It's the 0x80 it objects to, presumably because it's invalid ISO 8859-1.
My investigation, and suggestion:

    $ cat <<<$'\U2020'
    †
    $ hd <<<$'\U2020'
    00000000  e2 80 a0 0a                                       |....|
    00000004
    $ refer <<<$'\U2020'
    .lf 1 -
    refer:<standard input>:0: invalid input character code 128
    �
    $ LC_ALL=C refer <<<$'\U2020'
    .lf 1 -
    refer:<standard input>:0: invalid input character code 128
    �
    $ preconv <<<$'\U2020' | hd
    00000000  2e 6c 66 20 31 20 2d 0a  5c 5b 75 32 30 32 30 5d  |.lf 1
    -.\[u2020]|
    00000010  0a                                                |.|
    00000011
    $ preconv <<<$'\U2020' | refer
    .lf 1 -
    .lf 1 -
    \[u2020]
    $

-- 
Cheers, Ralph.

Reply via email to