[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#903373: kitty: image rendering seems to be broken



Control: reassign -1 libxkbcommon-x11-0 0.8.0-2
Control: retitle -1 "not a valid UTF-8 string" errors creating compose table in en_IN locale

On Mon, Jul 09, 2018 at 11:15:49AM +0530, Ritesh Raj Sarraf wrote:
> Thank you for packaging the newer version of kitty.
> 
> With this version, the `icat` and `diff` commands fail with the
> following error:

This also happens simply when starting kitty, but those go into your
session error log.

> rrs@priyasi:~$ kitty diff rrs-home/Data/Pictures/debian-transparent.png 
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:87:34: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:88:29: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:89:29: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:90:29: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:91:29: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:92:27: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:93:27: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:94:27: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:95:27: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:96:29: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:97:29: string literal is not a valid UTF-8 string
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:97:29: too many errors
> xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:97:29: failed to parse file
> [190 11:11:39.666312] [glfw error 65544]: Failed to create XKB compose table
> 
> <snip>
> Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8), LANGUAGE=en_IN:en (charmap=UTF-8)

That error is directly from xkbcommon's code[0].  If you instead use
LANG=en_IN.UTF-8, then there are no issues.  It appears that xkbcommon
is falling back incorrectly when there isn't an explicit codeset.

[0]: https://sources.debian.org/src/libxkbcommon/0.8.0-2/src/compose/parser.c/?hl=207#L207

That being said, just "en_IN" is what "dpkg-reconfigure locales"
generates when selecting that locale.  Both reportbug and "locale -c
charmap" are able to figure out that the codeset is UTF-8.

kitty is using essentially the exact code[1] that xkbcommon's
documentation suggests to use when calling
xkb_compose_table_new_from_locale().

I'm reassigning to xkbcommon to see if there's something they can do to
better handle this.

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB


Reply to: