[issue24665] CJK support for textwrap

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- nosy: +xi2 nosy_count: 10.0 -> 11.0 pull_requests: +26575 pull_request: https://github.com/python/cpython/pull/28136 ___ Python tracker ___

[issue24665] CJK support for textwrap

2018-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: My msg323731 for #12568 refers to my msg321291 above. I did some new experiments with column spacing for European characters in Windows console (as opposed to tk Text) and discovered that some, including some Latin1 characters used in English text, may

[issue24665] CJK support for textwrap

2018-07-09 Thread INADA Naoki
INADA Naoki added the comment: Thanks, Terry. I have doubt about "east asian width" support should be merged. While I agree it is "better than nothing", it may make textwrap much slower. But I didn't have courage to reject the PR. Textwrap focused on ASCII and English-like (space separated)

[issue24665] CJK support for textwrap

2018-07-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think that this issue should be closed, as it is based on some confusions and errors. Textwrap works in terms of characters. The wrap method "wraps the single paragraph in text (a string) so every line is at most width characters long." When the module

[issue24665] CJK support for textwrap

2018-07-08 Thread INADA Naoki
INADA Naoki added the comment: I'm not expert of this area, but Korean support is still totally broken: >>> import unicodedata >>> s = "\u1100\u1161\u11a8" >>> unicodedata.east_asian_width(s[0]) 'W' >>> unicodedata.east_asian_width(s[1]) 'N' >>> unicodedata.east_asian_width(s[2]) 'N' >>> s

[issue24665] CJK support for textwrap

2018-02-12 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +5450 stage: -> patch review ___ Python tracker ___

[issue24665] CJK support for textwrap

2018-02-12 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +5450, 5451 stage: -> patch review ___ Python tracker ___

[issue24665] CJK support for textwrap

2018-02-12 Thread Julien Palard
Julien Palard added the comment: I reread issue6755, issue12485, issue12499, and issue12568 about the textwrap/char width topic, and went to those conclusions: - It's a hard topic [1][2], so we may not succeed in a single shot. - The work is already done by wcwidth in

[issue24665] CJK support for textwrap

2017-07-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue24665] CJK support for textwrap

2017-07-03 Thread STINNER Victor
STINNER Victor added the comment: I remove the dependency to bpo-12568 since the current PR uses unicodedata.east_asian_width(), not the C function wcswidth(). -- dependencies: -Add functions to get the width in columns of a character ___ Python

[issue24665] CJK support for textwrap

2017-03-02 Thread INADA Naoki
INADA Naoki added the comment: See also http://www.unicode.org/reports/tr29/ http://www.unicode.org/reports/tr14/ -- ___ Python tracker ___

[issue24665] CJK support for textwrap

2017-02-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Add functions to get the width in columns of a character, textwrap.wrap: add control for fonts with different character widths ___ Python tracker

[issue24665] CJK support for textwrap

2017-02-14 Thread INADA Naoki
INADA Naoki added the comment: FYI, I had implemented textwrap respects EAW in Bazaar project. See here. http://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev/revision/5874 -- ___ Python tracker

[issue24665] CJK support for textwrap

2017-02-14 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Some CJK character are marked as "ambiguous width". Seems in this patch ambiguous characters are assumed as narrow. Maybe it's better to document it? -- nosy: +Chi Hsuan Yen ___ Python tracker

[issue24665] CJK support for textwrap

2017-02-14 Thread INADA Naoki
INADA Naoki added the comment: Sorry, I'm not unicode expert. Important usage of textwrap is printing in terminal. So I think we should learn from software relating terminal. tmux uses utf8proc. utf8proc calculates display width by script at here.

[issue24665] CJK support for textwrap

2017-02-14 Thread STINNER Victor
STINNER Victor added the comment: See also the now old issue #12568: "Add functions to get the width in columns of a character". -- ___ Python tracker

[issue24665] CJK support for textwrap

2017-02-14 Thread STINNER Victor
STINNER Victor added the comment: Florent Gallaire: Since Python 3.0 was released in 2008, new features are no more accepted in Python 2 (Python 2.7, the last release of Python 2). It's a deliberate choice, mostly motivated by the lack of CPython developers. See also the PEP 404. I'm only

[issue24665] CJK support for textwrap

2017-02-13 Thread Florent Gallaire
Florent Gallaire added the comment: After discussion with Haypo, CJK support is now implemented as and option, disabled by default for backward compatibility reasons. PR on GitHub: https://github.com/python/cpython/pull/89 -- pull_requests: +56 ___

[issue24665] CJK support for textwrap

2016-12-26 Thread Florent Gallaire
Florent Gallaire added the comment: Hello everybody, This is a Python3 version of my lib CJKwrap: https://github.com/fgallaire/cjkwrap3 It could be integrated as a new lib in Python 3.7. People who are using textwrap will have no surprise, and people who wants CJK width support will be happy

[issue24665] CJK support for textwrap

2016-09-13 Thread Florent Gallaire
Florent Gallaire added the comment: CJKwrap a little lib to fix this bug: https://github.com/fgallaire/cjkwrap -- ___ Python tracker ___

[issue24665] CJK support for textwrap

2015-09-13 Thread Florent Gallaire
Changes by Florent Gallaire : Added file: http://bugs.python.org/file40451/CJK+fix.patch ___ Python tracker ___

[issue24665] CJK support for textwrap

2015-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What textwrap does not take into account the width of characters is not the only problem. It also does not take into account combining characters and control codes. Implementing all this will significantly complicate the code and possibly should lie outside

[issue24665] CJK support for textwrap

2015-07-21 Thread Florent Gallaire
Florent Gallaire added the comment: If your unicode experts haven't fix this BUG still now, this will never be done (by this experts). We can say they are not true unicode experts as they have forgotten since a so long time billions of CJK people ! --

[issue24665] CJK support for textwrap

2015-07-21 Thread R. David Murray
R. David Murray added the comment: Or perhaps we haven't had a CJK user interested enough in using textwrap to provide the needed enhancements. It seems like there is interest in solving the related problems recently, so perhaps some progress will be made now. The fact that you view it as a

[issue24665] CJK support for textwrap

2015-07-20 Thread R. David Murray
R. David Murray added the comment: Because to get proper unicode support, we wrote python3, and because handling anything other than single-character-width characters in textwrap is a new feature. -- nosy: +r.david.murray versions: +Python 3.6 -Python 2.7

[issue24665] CJK support for textwrap

2015-07-20 Thread R. David Murray
R. David Murray added the comment: The problem is (if I'm understanding this correctly, which I may not be, I'm not a unicode expert) is that how you compute and manipulate CJK characters in python2 differs depending on whether you are dealing with a wide build or a narrow build. And the

[issue24665] CJK support for textwrap

2015-07-20 Thread Florent Gallaire
Florent Gallaire added the comment: FUD about Python here is something I wasn't expecting. Python 2 supports Unicode and is still used a lot by a lot of people. CJK people are not subhumans, so don't support CJK is something called, wait... a bug ! And it's a shame that it was not fixed

[issue24665] CJK support for textwrap

2015-07-19 Thread Florent Gallaire
Florent Gallaire added the comment: Bad wrapping of CJK chars is a bug. I don't understand why Python2 should be broken forever! -- versions: +Python 2.7 -Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24665

[issue24665] CJK support for textwrap

2015-07-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: This is new feature and can be added only in 3.6. Issue12499 looks related. See also issue12568. -- nosy: +georg.brandl, pitrou, serhiy.storchaka versions: +Python 3.6 -Python 2.7 ___ Python tracker

[issue24665] CJK support for textwrap

2015-07-18 Thread Florent Gallaire
Changes by Florent Gallaire fgalla...@gmail.com: -- components: Library (Lib) files: CJK.patch keywords: patch nosy: fgallaire priority: normal severity: normal status: open title: CJK support for textwrap type: enhancement versions: Python 2.7 Added file: