Skip to content

Fix locale thousands separator producing '?' on Linux with multibyte UTF-8 separators#5550

Merged
marchcat merged 1 commit intodevelop-linuxfrom
marchcat/5466
Mar 18, 2026
Merged

Fix locale thousands separator producing '?' on Linux with multibyte UTF-8 separators#5550
marchcat merged 1 commit intodevelop-linuxfrom
marchcat/5466

Conversation

@marchcat
Copy link
Copy Markdown
Contributor

It's just a clean cherry-pick of the change from #5466.

Original description:

getThousandsSeparator() and getMonetaryThousandsSeparator() extracted only the first byte of localeconv()->thousands_sep, truncating multibyte UTF-8 separator characters (e.g. non-breaking space U+00A0). The incomplete byte was then embedded via %c format specifier, producing invalid UTF-8 rendered as '?' in notifications like avatar complexity.

Return the full separator string and use string concatenation instead of %c.

…UTF-8 separators

getThousandsSeparator() and getMonetaryThousandsSeparator() extracted only
the first byte of localeconv()->thousands_sep, truncating multibyte UTF-8
separator characters (e.g. non-breaking space U+00A0). The incomplete byte
was then embedded via %c format specifier, producing invalid UTF-8 rendered
as '?' in notifications like avatar complexity.

Return the full separator string and use string concatenation instead of %c.
@marchcat
Copy link
Copy Markdown
Contributor Author

This one was originally approved in #5466, merging.

@marchcat marchcat merged commit d045f9a into develop-linux Mar 18, 2026
16 checks passed
@marchcat marchcat deleted the marchcat/5466 branch March 18, 2026 04:39
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate #5466 Fix locale thousands separator producing '?' on Linux with multibyte UTF-8 separators

2 participants