Revert "vt: remove zero-white-space handling from conv_uni_to_pc()"

This reverts commit b35f7a773c.

A new version of the series was submitted, so it's easier to revert the
old one and add the new one due to the changes invovled.

Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2025-04-26 11:21:12 +02:00
parent cb0ce93c8b
commit ab67c4622c
2 changed files with 3 additions and 3 deletions

View File

@ -870,6 +870,8 @@ int conv_uni_to_pc(struct vc_data *conp, long ucs)
return -4; /* Not found */
else if (ucs < 0x20)
return -1; /* Not a printable character */
else if (ucs == 0xfeff || (ucs >= 0x200b && ucs <= 0x200f))
return -2; /* Zero-width space */
/*
* UNI_DIRECT_BASE indicates the start of the region in the User Zone
* which always has a 1:1 mapping to the currently loaded font. The

View File

@ -2964,15 +2964,13 @@ static int vc_con_write_normal(struct vc_data *vc, int tc, int c,
goto out;
}
}
/* padding for the legacy display like done below */
tc = ' ';
}
}
/* Now try to find out how to display it */
tc = conv_uni_to_pc(vc, tc);
if (tc & ~charmask) {
if (tc == -1)
if (tc == -1 || tc == -2)
return -1; /* nothing to display */
/* Glyph not found */