Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line length calculated in bytes #155

Closed
yurikhan opened this issue Mar 27, 2018 · 1 comment
Closed

Line length calculated in bytes #155

yurikhan opened this issue Mar 27, 2018 · 1 comment

Comments

@yurikhan
Copy link

Characters represented by multiple bytes are counted incorrectly. For example, consider a comment written in Russian language using Cyrillic script which, when encoded in UTF-8, takes 2 bytes per letter:

-- ..5...10....5...20....5...30....5...40
-- Я могу есть стекло, оно мне не вредит.
$ locale|grep CTYPE
LC_CTYPE="en_US.UTF-8"

$ luacheck --max-line-length 50 test1.lua
Checking test1.lua                                1 warning

    test1.lua:2:51: line is too long (70 > 50)

Total: 1 warning / 0 errors in 1 file
@yurikhan
Copy link
Author

Sorry, dupe of #136.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant