By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,002 Members | 1,171 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,002 IT Pros & Developers. It's quick & easy.

Problem with format string and unicode

P: n/a
Hi,

this is probably a trivial problem, but a google search for "python"
and "unicode" and" format string" gives too many hits: If I specify
e.g. "%20s" in a format string and the string value contains UTF-8
stuff (differing number of bytes per character), the length of the
resulting string (in characters) varies. How can I fix this?

Many thanks in advance!

--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Mar 28 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 28 Mar 2008 21:13:00 +0100, Hans Martin wrote:
this is probably a trivial problem, but a google search for "python"
and "unicode" and" format string" gives too many hits: If I specify
e.g. "%20s" in a format string and the string value contains UTF-8
stuff (differing number of bytes per character), the length of the
resulting string (in characters) varies. How can I fix this?
Use unicode strings instead.

Ciao,
Marc 'BlackJack' Rintsch
Mar 28 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.