zopencommunity / zopencommunity/bashport

intl.tests: Length of UTF8 string is wrong

Open
#31 2 comments 0 reactions 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.