[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: parse-time-string error with non ASCII timestamp
From: |
Kenichi Handa |
Subject: |
Re: Fwd: parse-time-string error with non ASCII timestamp |
Date: |
Tue, 17 Apr 2007 20:20:55 +0900 |
In article <address@hidden>, "Levin Du" <address@hidden> writes:
[...]
> My timestamp includes Chinese number, when the following executes:
> (parse-time-string "<2007-04-02 δΈ€>") ; the 12nd char is the
> Chinese number.
> An error will occur:
> Debugger entered--Lisp error: (args-out-of-range [nil nil nil nil nil
> nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
[...]
> This is a patch I wrote to solve this problem:
> *** /home/zslevin/Cook/emacs/lisp/calendar/parse-time.el.orig
> 2007-04-02 10:01:27.000000000 +0800
> --- /home/zslevin/Cook/emacs/lisp/calendar/parse-time.el 2007-04-02
> 15:35:07.000000000 +0800
> ***************
> *** 66,72 ****
> (aref parse-time-digits char))
> (defsubst parse-time-string-chars (char)
> ! (aref parse-time-syntax char))
> (put 'parse-error 'error-conditions '(parse-error error))
> (put 'parse-error 'error-message "Parsing error")
> --- 66,73 ----
> (aref parse-time-digits char))
> (defsubst parse-time-string-chars (char)
> ! (and (< char (length parse-time-syntax))
> ! (aref parse-time-syntax char)))
It seems that this is the right fix at the moment because
parse-time.el doesn't pay attention to non-ASCII characters
at all. In the future, we may have to improve it for
non-ASCII characters if necesary.
Shall I install that change?
---
Kenichi Handa
address@hidden