Re: curses inch()/mvinch() mangle non-ASCII characters of an 8-bit locale on a wide build

Thomas Dickey <[email protected]> Sat, 27 Jun 2026 17:12:18 -0400
Newsgroups gmane.comp.lib.ncurses.bugs
Message-ID <[email protected]>
--1RXTTu/o++wJyBor
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jun 27, 2026 at 07:42:50PM +0300, Serhiy Storchaka wrote:
> On a wide build (linked against ncursesw), window.inch() and window.mvinc=
h()
> return a wrong value for a non-ASCII character that is representable in t=
he
=2E..
> Only inch()/mvinch() are affected. inchstr()/inchnstr() are not exposed by
> the module, and getbkgd() already round-trips. The write side needs no
> change: ncurses stores each cell as a wchar_t on a wide build, so the
> asymmetry is purely on readback. UTF-8 locales remain unsupported for
> inch().

thanks (I assume "module" in this comment refers to python)

--=20
Thomas E. Dickey <[email protected]>
https://invisible-island.net

--1RXTTu/o++wJyBor
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmpAPK4ACgkQzCr0RyFn
vgPvywwAhjkgoRNQM8MvETi4QlNfzE2LpjS2KvNalUHq0cWxicdKB2V1dKmmBPuF
onWZt37CsqvkWWedyhyTrnXRuyuFk3k/hSU/XXj7ngixr1DgV9NMFvjISveq9Mjm
cJ/xz+YcTZcC1TYlLLrP0D410tw2iYIVnz1/xtAQC4cKS2ap/G0tPmG58Ox6KaI2
lygIOBZ5yrO5kEYOGkg95xCj7AAizmAvNdxFiJkUwBmGsrjnFmz6fDgwJVq7bkam
97cANhhRvnfFG1mxvM5jAg80FZ0jUzsDbjC5Q2W8gRwPHQV3OzHGxRJFE3ImL6Mk
XohQjgMAc4VQgL8qjUT0BFisBJ7RLcdq8+bDTjC21BxGllXJhsOGEYUQLz9uwiOF
563oG6LRTr+am8E1Vq5kZWI/whPlOKkwZCtAVS/3VJeXX7WqIIXz6um0zDvNPwcB
fyUuDk54R6MnmbOxxb7+5p1f40QnxofC/oIdbiaE15ltO2q/P9FyaxODTxqiXfqM
663bfdXX
=e7pc
-----END PGP SIGNATURE-----

--1RXTTu/o++wJyBor--