Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Row cell exceeding max length, text not folded correctly? #34

Closed
CaledoniaProject opened this issue Dec 30, 2017 · 6 comments
Closed

Row cell exceeding max length, text not folded correctly? #34

CaledoniaProject opened this issue Dec 30, 2017 · 6 comments

Comments

@CaledoniaProject
Copy link

I'm using the following code to create a table

		table = Texttable()
		table.set_cols_align(["r", "l"])
		# table.set_deco(Texttable.HLINES)
		table.add_rows([
			["Name", info['name']],
			["Description", info['description']],
			["Authors", ','.join(info['authors'])],
			["Disclosure Date", info['disclosure_date']],
			["References", "\n".join(references2list(info['references']))]
		], header = False)

And it ends up like this

screen 2017-12-30 at 10 59 05

@CaledoniaProject
Copy link
Author

Looks like unicode issue?

@foutaise
Copy link
Owner

Hi @CaledoniaProject

Might be a unicode issue. Please provide an example that I can play with in order to investigate.

Regards,

@CaledoniaProject
Copy link
Author

Minimal example

work.txt

@foutaise
Copy link
Owner

foutaise commented Dec 30, 2017

It's linked to a poor handling of CJK characters by textwrap.
(cf issue 12568).

I have a working version based on CJKwrap, I'll make a new
release in a few days, that will use cjkwrap instead of textwrap
if available.

@foutaise
Copy link
Owner

foutaise commented Jan 3, 2018

Hi @CaledoniaProject ,

Release v1.2.0 should fix this issue. You'll have to install the cjkwrap library (pip install cjkwrap) as a dependency.

Regards,

@foutaise foutaise closed this as completed Jan 3, 2018
@CaledoniaProject
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants