When printing a formatted string with a fixed length (e.g, %20s
), the width differs from UTF-8 string to a normal string:
>>> str1="Adam Matan"
>>> str2="אדם מתן"
>>> print "X %20s X" % str1
X Adam Matan X
>>> print "X %20s X" % str2
X אדם מתן X
Note the difference:
X Adam Matan X
X אדם מתן X
Any ideas?