tarantool / tarantool/doc

Fix utf8.len

Open Beginner friendly
#5,431 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

typo
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

https://github.com/tarantool/doc/blob/99a235a2514f746f854491fa025e2e77d31547cf/doc/reference/reference_lua/utf8.rst#L238-L239

Nothing about error

https://github.com/tarantool/doc/blob/99a235a2514f746f854491fa025e2e77d31547cf/locale/en/reference/reference_lua/utf8.pot#L318-L320

That's not so

tarantool> utf8.len("123\xf0\xf0")
---
- null
- 4
...

Lua5.3 doc

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.