[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] Stumpwm crashes when there is incorrect utf-8 in windows tit
From: |
Alexey Lebedeff |
Subject: |
Re: [STUMP] Stumpwm crashes when there is incorrect utf-8 in windows title |
Date: |
Mon, 23 Jun 2008 10:48:28 +0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
On Sat, 21 Jun 2008 02:50:17 -0700, Shawn Betts wrote:
>> The app that created incorrect title was Licq.
>> I made a small change in sbcl variant, so now invalid utf-8 is ignored.
>>
>> It's not perfect, because it replaces whole title with "<Invalid>" when
>> encounters incorrect utf-8, but this is enough for me.
SB> Is clisp affected by incorrect utf-8 from licq?
SB> A slightly better fix might be to have a fallback function that just
SB> converts each octet to a character and for any octet that doesnt have
SB> a character use ?. It'll still look corrupted but at least something
SB> half readable might come in..depending on the string. Anyone have
SB> better ideas?
Here is better version of utf8-to-string (sbcl part):
#+sbcl (handler-bind
((sb-impl::octet-decoding-error #'(lambda (c)
(invoke-restart 'use-value "?"))))
(sb-ext:octets-to-string octets '(vector (unsigned-byte 8)))
:external-format :utf-8)))
SB> Maybe the sbcl error has enough data in it to deal with the corruption?