[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash and Unicode

From: Jakub Jankiewicz
Subject: Bash and Unicode
Date: Fri, 21 Sep 2012 00:00:51 +0200


I don't know where to ask this or report a bug about it.

I find an issue with Unicode characters (polish) using figlet

$ figlet ó

 |/\/|__ /
  /_\ |_ \
 / _ \___/
/_/ \_\

ó is 243, I can call ord(u'ó') form python but not from bash

$ python -c 'print ord(u"ó")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: ord() expected a character, but string of length 2 found

and it display 2 characters I found that they are:


and the reason for this is I got:

echo -n ó | python -c 'import sys;
for c in sys.stdin.read():
    print ord(c)'

in my system. I thought that it's something with bash, so I try to call
exec function from C (I think it don't use shell).

#include <unistd.h>

void main() {
    execl("/usr/bin/figlet-figlet", "", "ó", NULL);

and got the same result. What's wrong? Anybody know how to fix it?
Where should I report this. Or maybe I have something wrong with my

I'm using Ubuntu 11.10 with XFce.

Jakub Jankiewicz, Web Developer

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]