>>>>> On Thu, 19 Dec 2019 17:11:24 +0200, Eli Zaretskii said: Eli> We need to truncate the names we store in the thread object (and Eli> document that). Eli> I think I'm going to change my mind on that. The complication here is Eli> that the name should be encoded by ENCODE_SYSTEM before we pass it to Eli> pthread_setname_np etc., and if the locale-coding-system is not UTF-8 Eli> and not single-byte, we don't really know where a character will end Eli> after encoding. And encoding one character at a time sounds too Eli> gross. Eli> So perhaps we should just truncate the bytes, and leave this to the Eli> application to make sure the result makes sense, and also disregard Eli> the difference between list-threads and the thread name as the OS and Eli> debuggers see it. Doing that will also avoid the complication of Eli> having the thread name return to the caller different from what the Eli> caller used. Hereʼs what it looks like.