Numbertext / libnumbertext

Number to number name and money text conversion libraries in C++, Java, JavaScript and Python & LibreOffice Calc Extension
BSD 3-Clause "New" or "Revised" License
67 stars 46 forks source link

[th] Wrong spelling #59

Closed tyindeepit closed 4 years ago

tyindeepit commented 4 years ago

Hi, using the demo and in the program, the function convert number 1 to Thai text wrong, both with NUMBERTEXT() and MONEYTEXT().

Example: 11,111.00 Current conversion (wrong) : หนึ่งหมื่น เอ็ด พัน เอ็ด ร้อยสิบเอ็ด Correct conversion should be : หนึ่งหมื่น หนึ่ง พัน หนึ่ง ร้อยสิบเอ็ด

Problem: The function converts every "1" after the first digit to "เอ็ด" except "10" digit.

Why it's wrong: "1" in Thai number can be "หนึ่ง" or "เอ็ด" but most of the time it will be "หนึ่ง"

Please see here for reference and more info.

tyindeepit commented 4 years ago

I looked around the source code and found this commit that tried to fix this exact issue. I don't know if it's fixed before but currently the issue still persists.

tyindeepit commented 4 years ago

Okay, the issue was fixed in Feb 19. This issue should be closed now. Just FYI, however, the LibreOffice extension and the release were still using Oct 18 code. Anyone not building from latest code will experience this issue.