From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.bugs Subject: Re: Display problem on Windows with time zones containing Non-ASCII characters. Date: Wed, 06 Jun 2007 00:32:53 +0100 Message-ID: <4665F2A5.9060802@gnu.org> References: <4665D5B9.2050300@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181086391 13849 80.91.229.12 (5 Jun 2007 23:33:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Jun 2007 23:33:11 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Michael Schierl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 06 01:33:09 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HviWS-0003Wl-Tv for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jun 2007 01:33:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HviWS-0000nF-8l for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jun 2007 19:33:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HviWP-0000ir-TL for bug-gnu-emacs@gnu.org; Tue, 05 Jun 2007 19:33:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HviWO-0000eX-AM for bug-gnu-emacs@gnu.org; Tue, 05 Jun 2007 19:33:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HviWO-0000eK-5t for bug-gnu-emacs@gnu.org; Tue, 05 Jun 2007 19:33:04 -0400 Original-Received: from outmail1.freedom2surf.net ([194.106.33.237]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HviWN-0005mD-Qa for bug-gnu-emacs@gnu.org; Tue, 05 Jun 2007 19:33:03 -0400 Original-Received: from [127.0.0.1] (i-83-67-23-108.freedom2surf.net [83.67.23.108]) by outmail1.freedom2surf.net (Postfix) with ESMTP id 4C54150A51; Wed, 6 Jun 2007 00:33:02 +0100 (BST) User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) In-Reply-To: <4665D5B9.2050300@gmx.de> X-detected-kernel: Linux 2.4-2.6 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15763 Archived-At: Michael Schierl wrote: > Please describe exactly what actions triggered the bug > and the precise symptoms of the bug: > > - Load emacs -Q on Windows, on German Windows XP > - M-x calendar > - Go to 21 June 2007, and press "h" > - you will see in minibuffer: > > Thursday, June 21, 2007: Summer Solstice 8:05pm (Westeurop\344ische > Normalzeit) > > In current-time-zone (editfns.c), we have the following code: #if defined HAVE_TM_ZONE || defined HAVE_TZNAME if (s) { /* On Japanese w32, we can get a Japanese string as time zone name. Don't accept that. */ char *p; for (p = s; *p && (isalnum ((unsigned char)*p) || *p == ' '); ++p) ; if (p == s || *p) s = NULL; } #endif [...] return Fcons (make_number (offset), Fcons (build_string (s), Qnil)); So the same bug must have been reported in the past for the Japanese locale on W32, but we covered it over by rejecting non alphanumeric timezone names rather than fixing the bug by decoding them using locale_coding_system. I guess w32 is the only system where localized full timezone names are returned by the tzname call or tm_zone struct member, which is why we only notice it there.