Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, ezio.melotti, lemburg
Date 2010-07-08.08:53:03
SpamBayes Score 8.70461e-05
Marked as misclassified No
Message-id <>
On wide unicode builds, '\U00010000'.isprintable() returns True, and repr() returns the character unmodified.
Is it a good behavior, given that very few fonts have can display this character?

Marc-Andre Lemburg wrote:
> The "printable" property is a Python invention, not a Unicode property,
> so we do have some freedom is deciding what is printable and what
> is not.

The current implementation considers printable """all the characters except those characters defined in the Unicode character database as following categories are considered printable.
  * Cc (Other, Control)
  * Cf (Other, Format)
  * Cs (Other, Surrogate)
  * Co (Other, Private Use)
  * Cn (Other, Not Assigned)
  * Zl Separator, Line ('\u2028', LINE SEPARATOR)
  * Zp Separator, Paragraph ('\u2029', PARAGRAPH SEPARATOR)
  * Zs (Separator, Space) other than ASCII space('\x20').

We could also arbitrarily exclude all the non-BMP chars.
Date User Action Args
2010-07-08 08:53:07amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, lemburg, ezio.melotti
2010-07-08 08:53:07amaury.forgeotdarcsetmessageid: <>
2010-07-08 08:53:03amaury.forgeotdarclinkissue9198 messages
2010-07-08 08:53:03amaury.forgeotdarccreate