Skip to content
Snippets Groups Projects
Commit ada63e45 authored by Sébastien Luttringer's avatar Sébastien Luttringer
Browse files

string interpolation must be done in unicode

If we have to format (aka interpolatation) we need to be sure this have to be
done in unicode and not in ascii. This avoid unicode error with ascii string
encoded in utf-8.

Example of failure between a string and an object

b = Exception(u"é")
Exception("error: %s" % b)
 => Exception("error: %s" % str(b)
 => UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: ordinal not in range(128)
parent 675484b6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment