Re: Using "textwrap" package for unwrappable languages (Japanese)

2023-08-30 Thread Peter J. Holzer via Python-list
On 2023-08-30 13:18:25 +, c.buhtz--- via Python-list wrote: > Am 30.08.2023 14:07 schrieb Peter J. Holzer via Python-list: > > another caveat: Japanese characters are usually double-width. So > > (unless your line length is 130 characters for English) you would > > want to add that line break

Re: Using "textwrap" package for unwrappable languages (Japanese)

2023-08-30 Thread c.buhtz--- via Python-list
Dear Peter, thanks for your reply. That is a very interesting topic. I was a bit wrong. I realized that textwrap.wrap() do insert linebreaks when "words" are to long. So even a string without any blank space well get wrapped. Am 30.08.2023 14:07 schrieb Peter J. Holzer via Python-list:

Re: Using "textwrap" package for unwrappable languages (Japanese)

2023-08-30 Thread Peter J. Holzer via Python-list
On 2023-08-30 11:32:02 +, c.buhtz--- via Python-list wrote: > I do use "textwrap" package to wrap longer texts passages. Works well with > English. > But the source string used is translated via gettext before it is wrapped. > > Using languages like Japanese or Chinese would IMHO result in