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

feat!: Add use_wcwidth for Asian character support #63

Merged
merged 9 commits into from
Dec 14, 2022
Merged

Conversation

DenverCoder1
Copy link
Owner

@DenverCoder1 DenverCoder1 commented Dec 11, 2022

Fixes #60

Old output using len:

>>> print(t2a(
...     header=["日期", "test"],
...     body=[["2022/12/11", "test"], ["2022/1/1", "測試"]],
...     cell_padding=5,
...     use_wcwidth=False,
... ))

image

New output with use_wcwidth flag:

>>> print(t2a(
...     header=["日期", "test"],
...     body=[["2022/12/11", "test"], ["2022/1/1", "測試"]],
...     cell_padding=5,
...     use_wcwidth=True,
... ))

image

Test with pip install -U git+https://github.com/DenverCoder1/table2ascii.git@wcswidth

@DenverCoder1 DenverCoder1 added the enhancement New feature or request label Dec 11, 2022
@DenverCoder1 DenverCoder1 changed the title feat: Add use_wcwidth for Asian character support feat!: Add use_wcwidth for Asian character support Dec 11, 2022
@DenverCoder1 DenverCoder1 merged commit 9ad460f into main Dec 14, 2022
@DenverCoder1 DenverCoder1 deleted the wcswidth branch December 14, 2022 03:30
@DenverCoder1 DenverCoder1 restored the wcswidth branch December 14, 2022 03:45
@DenverCoder1 DenverCoder1 deleted the wcswidth branch December 14, 2022 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Different languages cause layout changes.
1 participant