I am trying to write a Scribunto module to convert Thai numbers to Arabic numbers, but it always fails and debug module does not understand the number at all.
Scribunto still passes Thai numbers as input straight through to the output successfully (without any work done to it), so this might be a problem with successfully matching characters to the same character in the table.
more edit: string.gsub() successfully convert the numbers, but still keeping this task open because the original method should have worked too.
See https://th.wikisource.org/wiki/Module_talk:ThaiToArabicNum/testcases test_2 and test_3 to see how it does not work, and https://th.wikisource.org/wiki/Module:ThaiToArabicNum/sandbox is the code.
List of steps to reproduce (step by step, including full links if applicable): go to https://th.wikisource.org/wiki/Module_talk:ThaiToArabicNum/testcases test_2 and test_3
What happens?: Thai to Arabic number conversion completely fails because Scribunto does not understand Thai number as input
What should have happened instead?: Thai to Arabic number conversion passes (like the script not in sandbox)
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.: Thai Wikisource