[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build
Terry J. Reedy
report at bugs.python.org
Sat Nov 27 00:37:25 CET 2010
Terry J. Reedy <tjreedy at udel.edu> added the comment:
As a practical matter, I think that for at least the next decade, people are at least as likely to want to fill with a composed, multi-BMP-codepoint 'char' (grapheme) as with a non-BMP char. So to me, failure with the latter is no worse than failure with the former.
The underlying problem is that centering k chars within n spaces with fill i is based on one-char per code encodings *and* fixed pitch fonts with one-char per space. That model is not universally applicable, so I do not consider it a bug that functions based on that model are also not universally applicable. Perhaps docs should be clearer about the limitations of many of the string methods in the new context.
A full general solution to the general problem of centering requires a shift to physical units (points or mm) and detailed font information, including kerning. This is beyond the scope of a string method.
So I consider this a feature request for a partial generalization of unclear utility and unclear definition.
----------
nosy: +terry.reedy
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10521>
_______________________________________
More information about the Python-bugs-list
mailing list