[konsole] [Bug 488100] New: U+FFFD Replacement character width mismatch
VP
bugzilla_noreply at kde.org
Thu Jun 6 10:42:48 BST 2024
https://bugs.kde.org/show_bug.cgi?id=488100
Bug ID: 488100
Summary: U+FFFD Replacement character width mismatch
Classification: Applications
Product: konsole
Version: 24.02.2
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: minor
Priority: NOR
Component: font
Assignee: konsole-devel at kde.org
Reporter: reg.bugs at poti.sk
Target Milestone: ---
SUMMARY
The U+FFFD character has width 1, but the glyph takes 2 columns on the screen.
STEPS TO REPRODUCE
1. in konsole+shell: `echo '-_-_-' ; echo -e "-_\uFFFD_-"`
OBSERVED RESULT
The first line just prints an auxiliary pattern of 5 plain chars. Its total
width is 5 cells.
The second line prints the same pattern with the middle character replaced by
the replacement mark: � (a questionmark on a diamond-shaped background).
The second line has also the total width 5, the pattern matches column by
column, but the � character occupies two cells and partially overwrites the
next character.
EXPECTED RESULT
Either the U+FFFD character is double-width and takes 2 cells making the total
length equal to 6 (instead of 5) or its a regular witdth character and takes
just 1 screen cell without any overlap.
SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.05
Qt Version: 6.7.1
ADDITIONAL INFORMATION
This C program prints that the width of the Unicode character in question is
1.
```
#define _XOPEN_SOURCE
#include <locale.h>
#include <stdio.h>
#include <wchar.h>
int main() {
setlocale(LC_ALL, "en_US.UTF-8");
printf("width %d\n", wcwidth((wchar_t)0xFFFD));
}
```
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list