When I run this code (a simplified version), XEmacs crashes. The
problem is the text property.
(defun test-decode (word) 
  (let ((i -1) (s (substring word 0)) v)
    (while (< (incf i) (length s))
      (if (eq (setq v (aref s i)) ? ) nil
	(aset s i (+ 128 v))))
    s))
(let ((s  "~{<:Ky2;S{#,NpJ)l6HK!#~}"))
  (put-text-property 0 (length s) 'face 'bold s)
  (setq s (test-decode s))
  (decode-coding-string s 'cn-gb-2312))
-- 
Shenghuo