From owner-freebsd-i18n@FreeBSD.ORG Fri May 13 08:13:26 2005 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F80D16A4CE for ; Fri, 13 May 2005 08:13:26 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42BD943D7E for ; Fri, 13 May 2005 08:13:26 +0000 (GMT) (envelope-from t.piyawat@gmail.com) Received: by zproxy.gmail.com with SMTP id 40so1400455nzk for ; Fri, 13 May 2005 01:13:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=WLNeedOI14nIRlWHu3nNdBH1/neJ1yE5wmbCusqDfEFW/SylHB6ihdORmx51pkoOKV9HPs82Pi+nsE6vNj7Vz3yEJE0UrOrLeNIQGgwfixDuXpHlR7NGOQCP1ATCLY5qSbuIbj1FIg6pYxOKs98+muWRJvgu3i8+IhN9i5dU8MY= Received: by 10.36.129.4 with SMTP id b4mr980846nzd; Fri, 13 May 2005 01:13:25 -0700 (PDT) Received: by 10.36.50.13 with HTTP; Fri, 13 May 2005 01:13:25 -0700 (PDT) Message-ID: <5a5e08400505130113707b29fe@mail.gmail.com> Date: Fri, 13 May 2005 15:13:25 +0700 From: Thawatchai Piyawat To: freebsd-i18n@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: LC_TIME for Buddhist Era in Thailand X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Thawatchai Piyawat List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 08:13:26 -0000 Hello, I've created a locale th_TH (Thai in Thailand). It can be found in ports/misc/thailocale. Everything seems to work fine so far except a problem in LC_TIME. To solve the problem, I would like to ask everyone the following questions: 1) In Thailand, we use the Buddhist Era that starts 543BC. This year (2005) is the year 2548 in Thailand. The problem is that I can't figure out how to put "plus 543" in the LC_TIME file. 2) I can't find a syntax reference for FreeBSD locale definitions. I've created th_TH by looking at the source of other locales. This method works, but it doesn't give me certainty that what I've done is correct. If such references exist, it would really help me. Thanks, Thawatchai Piyawat From owner-freebsd-i18n@FreeBSD.ORG Fri May 13 10:35:42 2005 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBE0A16A4CE for ; Fri, 13 May 2005 10:35:42 +0000 (GMT) Received: from fgwmail6.fujitsu.co.jp (fgwmail6.fujitsu.co.jp [192.51.44.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA82E43D67 for ; Fri, 13 May 2005 10:35:41 +0000 (GMT) (envelope-from numa@sysrap.cs.fujitsu.co.jp) Received: from m1.gw.fujitsu.co.jp ([10.0.50.71]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) id j4DAZftZ006573; Fri, 13 May 2005 19:35:41 +0900 (envelope-from numa@sysrap.cs.fujitsu.co.jp) Received: from s5.gw.fujitsu.co.jp by m1.gw.fujitsu.co.jp (8.12.10/Fujitsu Domain Master) id j4DAZe2C012613; Fri, 13 May 2005 19:35:40 +0900 (envelope-from numa@sysrap.cs.fujitsu.co.jp) Received: from s5.gw.fujitsu.co.jp (localhost [127.0.0.1]) by s5.gw.fujitsu.co.jp (Postfix) with ESMTP id 7F0503000B; Fri, 13 May 2005 19:35:40 +0900 (JST) Received: from sphinx.sysrap.cs.fujitsu.co.jp (sphinx.sysrap.cs.fujitsu.co.jp [10.36.40.56]) by s5.gw.fujitsu.co.jp (Postfix) with ESMTP id 3103230008; Fri, 13 May 2005 19:35:40 +0900 (JST) Received: (from numa@localhost) by sphinx.sysrap.cs.fujitsu.co.jp (8.9.3/3.7W) id TAA25658; Fri, 13 May 2005 19:35:39 +0900 (JST) Date: Fri, 13 May 2005 19:35:38 +0900 From: NUMATA Toshinori To: Thawatchai Piyawat Message-ID: <20050513103537.GA22714%numata@jp.fujitsu.com> References: <5a5e08400505130113707b29fe@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a5e08400505130113707b29fe@mail.gmail.com> User-Agent: Mutt/1.4.2.1i cc: freebsd-i18n@freebsd.org Subject: Re: LC_TIME for Buddhist Era in Thailand X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 10:35:42 -0000 Hi, Thawatchai Piyawat wrote: > I've created a locale th_TH (Thai in Thailand). It can be found in > ports/misc/thailocale. Everything seems to work fine so far except a > problem in LC_TIME. > > To solve the problem, I would like to ask everyone the following questions: > > 1) In Thailand, we use the Buddhist Era that starts 543BC. This year > (2005) is the year 2548 in Thailand. The problem is that I can't > figure out how to put "plus 543" in the LC_TIME file. I've read the source code of libc's time- and locale-related functions. It seems to me that the current LC_TIME support does not have "era" support. I've read the following files: src/lib/libc/locale/setlocale.c src/lib/libc/stdtime/timelocal.h src/lib/libc/stdtime/timelocal.c and found that the lc_time_T structure defined in timelocal.h (which is used to contain locale-dependent strings for month names, date format, etc.) does not have any era-related members. The Single UNIX Specification, the standard for UNIX systems, defines how to describe era in LC_TIME definition. Currently only commercial UNIX systems such as Solaris and HP-UX have suport of era. The following is the manual for HP-UX: http://docs.hp.com/en/B9106-90011/localedef.4.html Search for "LC_TIME" and see how era definitions are described. > 2) I can't find a syntax reference for FreeBSD locale definitions. > I've created th_TH by looking at the source of other locales. This > method works, but it doesn't give me certainty that what I've done is > correct. If such references exist, it would really help me. I couldn't find such document neither. The format of LC_TIME seems that the file contains lines of text string, each line corresponds to one string entry of lc_time_T structure. For example, the first line corresponds to mon[0] string, the second line to mon[1] string, and so on. The lines that begin with "#" character are comments and will be deleted before installation, so only data lines are included in the installed locale files. Toshinori NUMATA From owner-freebsd-i18n@FreeBSD.ORG Fri May 13 20:44:31 2005 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFF4616A4CE for ; Fri, 13 May 2005 20:44:31 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DB3543D48 for ; Fri, 13 May 2005 20:44:31 +0000 (GMT) (envelope-from t.piyawat@gmail.com) Received: by zproxy.gmail.com with SMTP id 40so1737237nzk for ; Fri, 13 May 2005 13:44:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IUIL9/inf1E7gOzEAHbT9txIQ1xj1LdQM6Wa50uG9s2Mtsixzuo4rwwQzwk6zh3dyl1IfAebm8VzHbbrq/Tum8l3sGN3XUFd9tO14xj8N8xo/ggr59+1X8RAF9OEtCh5QsUHelVk1c1iZOfgSINla+M9JoBwk4ubomV0A/i1OCs= Received: by 10.36.109.18 with SMTP id h18mr1228247nzc; Fri, 13 May 2005 13:44:30 -0700 (PDT) Received: by 10.36.50.8 with HTTP; Fri, 13 May 2005 13:44:30 -0700 (PDT) Message-ID: <5a5e0840050513134447742c59@mail.gmail.com> Date: Sat, 14 May 2005 03:44:30 +0700 From: Thawatchai Piyawat To: NUMATA Toshinori In-Reply-To: <20050513103537.GA22714%numata@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5a5e08400505130113707b29fe@mail.gmail.com> <20050513103537.GA22714%numata@jp.fujitsu.com> cc: freebsd-i18n@freebsd.org Subject: Re: LC_TIME for Buddhist Era in Thailand X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Thawatchai Piyawat List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 20:44:31 -0000 Hello Toshinori, Thanks a lot for the information. I read the files you've pointed out and also found that src/lib/libc/locale/nl_langinfo.c has ERA cases that are marked /* XXX: need to be implemented */ So, it's quite sure that ERA hasn't yet been supported in FreeBSD. BTW, glibc supports ERA. A Linux guy in Thailand defined ERA with this statement: %era "+:1:-542/01/01:+*::%N%o" It seems to be the same syntax as in the standard document. Thawatchai On 5/13/05, NUMATA Toshinori wrote: > Hi, >=20 > Thawatchai Piyawat wrote: >=20 > > I've created a locale th_TH (Thai in Thailand). It can be found in > > ports/misc/thailocale. Everything seems to work fine so far except a > > problem in LC_TIME. > > > > To solve the problem, I would like to ask everyone the following questi= ons: > > > > 1) In Thailand, we use the Buddhist Era that starts 543BC. This year > > (2005) is the year 2548 in Thailand. The problem is that I can't > > figure out how to put "plus 543" in the LC_TIME file. >=20 > I've read the source code of libc's time- and locale-related > functions. It seems to me that the current LC_TIME support > does not have "era" support. >=20 > I've read the following files: >=20 > src/lib/libc/locale/setlocale.c > src/lib/libc/stdtime/timelocal.h > src/lib/libc/stdtime/timelocal.c >=20 > and found that the lc_time_T structure defined in timelocal.h > (which is used to contain locale-dependent strings for month > names, date format, etc.) does not have any era-related members. >=20 > The Single UNIX Specification, the standard for UNIX systems, > defines how to describe era in LC_TIME definition. Currently > only commercial UNIX systems such as Solaris and HP-UX have > suport of era. The following is the manual for HP-UX: >=20 > http://docs.hp.com/en/B9106-90011/localedef.4.html >=20 > Search for "LC_TIME" and see how era definitions are described. >=20 >=20 > > 2) I can't find a syntax reference for FreeBSD locale definitions. > > I've created th_TH by looking at the source of other locales. This > > method works, but it doesn't give me certainty that what I've done is > > correct. If such references exist, it would really help me. >=20 > I couldn't find such document neither. The format of LC_TIME > seems that the file contains lines of text string, each line > corresponds to one string entry of lc_time_T structure. For > example, the first line corresponds to mon[0] string, the > second line to mon[1] string, and so on. >=20 > The lines that begin with "#" character are comments and will > be deleted before installation, so only data lines are included > in the installed locale files. >=20 >=20 > Toshinori NUMATA >