Ticket #130 (closed 不具合: fixed)

Opened 3 years ago

Last modified 3 years ago

format-time-string<f>がデコードしていない曜日を返す

Reported by: gotoh Assigned to: horiguti
Priority: minor Milestone:
Component: Emacs Lisp Version: 3.00 (開発中)
Keywords: Cc:

Description (Last modified by kose)

display-date-modeを使用していて気づいた。 (format-time-string "%a" (current-time))
=> "木"
などとなるべきであるが、帰ってくるのはデコードされていないShift_JIS 文字列となってしまっている。

以下はmeadow -q での再現例:

(format-time-string "%a %b:%e" (current-time))
"\226\330 7:21"
(decode-coding-string (format-time-string "%a %b:%e" (current-time)) 'shift_jis)
"木 7:21"

This ticket was imported from scarab issue MW118

Attachments

Change History

2005年09月15日 03時20分10秒 changed by horiguti

これは, locale-coding-system が nil であるのが原因です. (setq locale-coding-system 'sjis-dos) で正しい値が返ってきます.
Meadow で w32-system-coding-system としているものが emacs では locale-coding-system となっています.
ほかにも同様の部分が多数あるようです.
基本的に w32-system-coding-system は廃止して locale-coding-system を使うようにするのが正しいのではないでしょうか.

2005年09月16日 00時40分08秒 changed by anonymous

  • owner changed from somebody to anonymous.
  • status changed from new to assigned.

2005年09月16日 00時40分39秒 changed by horiguti

  • owner changed from anonymous to horiguti.
  • status changed from assigned to new.

2005年09月16日 01時36分26秒 changed by horiguti

  • status changed from new to closed.
  • resolution set to fixed.

trunk/r3871 で 全体的にw32-system-coding-system ではなく locale-coding-system を使うようにしました.[[BR]] w32-system-coding-system は互換性のために locale-coding-system のエイリアスとなりました. これらの変数の扱いについてはこの修正をもって emacs の CVS_HEAD に sync した状態になります.

2005年09月16日 11時50分02秒 changed by kose

  • status changed from closed to reopened.
  • resolution deleted.
  • description changed.

meadow -q で起動すると locale-coding-system は nil なので、 format-time-string で文字化け状態なのは治りません。

これの初期値をセットするのは #155 を対処すれば良いのかな。

2005年09月18日 20時43分53秒 changed by kose

  • status changed from reopened to closed.
  • resolution set to fixed.

#155 によって locale-coding-system がちゃんと初期化されるようになったので、 解決です。


Add/Change #130 (format-time-string<f>がデコードしていない曜日を返す)




Change Properties
Action