Fix utf8.len
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Nothing about error
That's not so
tarantool> utf8.len("123\xf0\xf0")
---
- null
- 4
...
Returns the number of UTF-8 characters in string s that start between positions i and j (both inclusive). The default for i is 1 and for j is -1. If it finds any invalid byte sequence, returns a false value plus the position of the first invalid byte.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with doc/reference/reference_lua/utf8.rst at lines 238-239 and compare the behavior with the linked Lua 5.3 documentation and the provided utf8.len example. Check the corresponding locale/en/reference/reference_lua/utf8.pot entry at lines 318-320. Done means the documentation accurately describes the invalid-byte result and its position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100