Skip to content

Bengali / Khmer / Gujarati / Odia / Hindi regression? #126

@masaccio

Description

@masaccio

I recently updated from 0.2.6 to 0.2.13 and I have some tests breaking in a package that uses wcswidth. The following test fails every check in 0.2.13 but passes in 0.2.6:

from wcwidth import wcswidth

def check(length, value):
    if wcswidth(value) == length:
        print(value, "OK")
    else:
        print(value, "FAIL")

check(10, '"আবখাজিয়া"')
check(12, '"আফগানিস্তান"')
check(10, '"আলবেনিয়া"')
check(10, '"अबख़ाज़िया"')
check(11, '"ඇෆ්ගනිස්ථානය"')
check(10, '"ඇල්බේනියාව"')
check(12, '"अफ़ग़ानिस्तान"')
check(12, '"ஆக்கானித்தான்"')
check(14, '"អាហ្វហ្គានីស្ថាន"')
check(12, '"અફગાનિસ્તાન"')
check(9, '"અલ્બેનિયા"')
check(12, '"ଆଫାଗାନିସ୍ତାନ୍"')
check(13, '"गन्धार, अश्वक"')
check(10, '"अल्बानिया"')

Aligning some ASCII text in my terminal, I believe that the check lengths are correct:

Screenshot 2024-05-15 at 15 13 55

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions