Fix invalid UTF-8 conversion
NOTE: I'm not intending to merge this MR because there is no maintained upstream. This MR exists so I have a convenient link. libxklavier is unmaintained and archived, you should get rid of it instead.
libxklavier truncates descriptions and the name to a fixed byte-length which can cause invalid UTF-8 sequences. Truncate those UTF-8 descriptions into the maximum valid length, effectively chopping off the invalid tail end.