liuxiran commented on issue #781: URL: https://github.com/apache/apisix-dashboard/issues/781#issuecomment-762011862
Just take Js for an example(sorry for not familiar with Golang and Lua): there is a string 'please take a look 一一': * the length of this string is 21, IMHO, this is what we are expected result; * the utf-8 byte length is 25. In fact a Chinese character is 3 byte long in JS too, may be these is equal to the current Lua result. If we need to limit the length of use input characters, we'd better limit the string length instead of string byte length, the reason is that the string is the same as the length user visually see, and at the same time we don't need to distinguish between languages. If we can reach a consensus, the only question is that: if there is a method which can get the string length in Lua? waiting for your reply, thanks a lot cc @membphis @nic-chen @starsz @tokers @imjoey ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
