miurahr / pykakasi

Lightweight converter from Japanese Kana-kanji sentences into Kana-Roman.
https://codeberg.org/miurahr/pykakasi
GNU General Public License v3.0
421 stars 54 forks source link

Infinite loop after running for a while #115

Closed zyddnys closed 3 years ago

zyddnys commented 3 years ago

Describe the bug If I convert a lot of texts using pykakasi, the program freeze after a while. I have found that the problem is caused by https://github.com/miurahr/pykakasi/blob/7d2179e7ec3fde9af2b5cb653c6475c819142c26/src/pykakasi/scripts.py#L152 Here if the if statement is not satisficed x will not increase and the while loop will not stop. To reproduce

kks = pykakasi.kakasi()
kks.convert('゙っ、')
miurahr commented 3 years ago

118 try to handle the case.

What does '゙っ、' should be converted in alphabet? @zyddnys any comment or your opinion?