Hacker News new | ask | show | jobs
by rwg 4247 days ago
Another fun Unicode-related bug in OS X 10.9:

    % printf 'Unicode strike\xcd\x9bs again' | LANG=en_US.UTF-8 od -tc
    Assertion failed: (width > 0), function conv_c, file /SourceCache/shell_cmds/shell_cmds-175/hexdump/conv.c, line 137.
    0000000    U   n   i   c   o   d   e       s   t   r   i   k   e 
    zsh: done       printf 'Unicode strike\xcd\x9bs again' | 
    zsh: abort      LANG=en_US.UTF-8 od -tc
I don't know if this is fixed in OS X 10.10 — I filed a bug with Apple a year ago, but it was marked as a duplicate of another bug. The only thing I can see about that other bug is that it's now closed.
2 comments

Not crashing for me in 10.10

    ~$ printf 'Unicode strike\xcd\x9bs again' | LANG=en_US.UTF-8 od -tc
    0000000    U   n   i   c   o   d   e       s   t   r   i   k   e    ͛  **
    0000020    s       a   g   a   i   n                                    
    0000027
Looks like it is fixed

$ printf 'Unicode strike\xcd\x9bs again' | LANG=en_US.UTF-8 od -tc 0000000 U n i c o d e s t r i k e ͛ 0000020 s a g a i n 0000027