• Bug#265187: iconv doesn't preserve \x5c (REVERSE SOLIDUS) from EUC-JP t

    From Fumitoshi UKAI@1:229/2 to All on Thu Aug 12 05:40:06 2004
    XPost: linux.debian.maint.glibc
    From: [email protected]

    Package: libc6
    Version: 2.3.2.ds1-15

    iconv doesn't preverve \x5c (REVERSE SOLIDUS) from EUC-JP to ISO-2022-JP.

    % printf "\xa4\xa2\x5c\x61\x5c\xa4\xa2\n" | \
    iconv -f EUC-JP -t UTF-8 | iconv -f UTF-8 -t EUC-JP |\
    od -t xC
    0000000 a4 a2 5c 61 5c a4 a2 0a
    0000010
    % printf "\xa4\xa2\x5c\x61\x5c\xa4\xa2\n" | \
    iconv -f EUC-JP -t SJIS |\
    od -t xC
    0000000 82 a0 5c 61 5c 82 a0 0a
    0000010

    These are ok, but if converted to ISO-2022-JP, ...

    % printf "\xa4\xa2\x5c\x61\x5c\xa4\xa2\n" | iconv -f EUC-JP -t ISO-2022-JP | od -t xC
    0000000 1b 24 42 24 22 21 40 1b 28 42 61 5c 1b 24 42 24
    0000020 22 1b 28 42 0a
    0000025

    So, \x5c (REVERSE SOLIDUS) becomes \x21\x40 in JIS X0208 (FULLWIDTH
    REVERSE SOLIDUS)

    Regards,
    Fumitoshi UKAI



    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)