zopencommunity / zopencommunity/bashport
intl.tests: Length of UTF8 string is wrong
Open
Nobody has claimed this yet.
bug
help wanted
- Dominant language
- Groovy
- Stars
- 12
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
The sequence:
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
var='абвгдежзиклмноп '
echo -"$var"- ${#var}
should print out:
-абвгдежзиклмноп - 16
but instead prints out:
-абвгдежзиклмноп - 31
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
No file or test is named. Start by reproducing the command with the stated UTF-8 locale, then trace the string-length handling used by ${#var}. Done means the command prints the expected value 16 rather than 31, with relevant tests covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- cli, internationalization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100