[
https://issues.apache.org/jira/browse/CASSANDRA-17287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brad Schoening updated CASSANDRA-17287:
---------------------------------------
Description:
The module wcwidth implements the same Markus Kuhn algorithm defined in
POSIX.1-2008 to return the number of cells a unicode string is expected to
occupy.
The module wcwidth used by hundreds of libraries including pytest and
prompt-toolkit (used in ipython). It would replace 379 lines of bespoke code
in cqlshlib.
{quote}from wcwidth import wcswidth # at [https://pypi.org/project/wcwidth/]
print(wcswidth('コンニチハ'))
10
{{from cqlshlib.wcwidth import wcswidth as cql_wcswidth}}
print(cql_wcswidth('コンニチハ'))
10
{quote}
was:
The module wcwidth implements the same Markus Kuhn algorithm defined in
POSIX.1-2008 to return the number of cells a unicode string is expected to
occupy.
The module wcwidth used by hundreds of libraries including pytest and
prompt-toolkit (used in ipython). It would replace 379 lines of bespoke code
in cqlshlib.
{quote}from wcwidth import wcswidth # from https://pypi.org/project/wcwidth/
print(wcswidth('コンニチハ'))
10
{{from cqlshlib.wcwidth import wcswidth as cql_wcswidth}}
print(cql_wcswidth('コンニチハ'))
10
{quote}
> Replace cqlshlib/wcwidth.py with pypi module 'wcwidth'
> ------------------------------------------------------
>
> Key: CASSANDRA-17287
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17287
> Project: Cassandra
> Issue Type: Task
> Components: CQL/Interpreter
> Reporter: Brad Schoening
> Priority: Normal
>
> The module wcwidth implements the same Markus Kuhn algorithm defined in
> POSIX.1-2008 to return the number of cells a unicode string is expected to
> occupy.
> The module wcwidth used by hundreds of libraries including pytest and
> prompt-toolkit (used in ipython). It would replace 379 lines of bespoke code
> in cqlshlib.
> {quote}from wcwidth import wcswidth # at [https://pypi.org/project/wcwidth/]
> print(wcswidth('コンニチハ'))
> 10
> {{from cqlshlib.wcwidth import wcswidth as cql_wcswidth}}
> print(cql_wcswidth('コンニチハ'))
> 10
> {quote}
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]