Skip site navigation (1) Skip section navigation (2)

Re: %2$, %1$ gettext placeholder replacement is not working under Win32

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nicolai Tufar <ntufar(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: %2$, %1$ gettext placeholder replacement is not working under Win32
Date: 2005-01-17 19:41:18
Message-ID: 9458.1105990878@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32
Nicolai Tufar <ntufar(at)gmail(dot)com> writes:
> Sorry for such a late submission.
> I just downloaded the latest postgresql-8.0.0-rc5-3.zip installer
> for windows and it appears that Windows' printf() does not
> support placeholder replacement as described in
> http://developer.postgresql.org/docs/postgres/nls.html#AEN57284

> Original string is <<%s at or near \"%s\">> and we
> replaced it in Turkish for <<\"%2$s\"  yerinde %1$s>>.

Hmm.  Looking around, it seems that %n$ support is required by the
Single Unix Spec:
http://www.opengroup.org/onlinepubs/007908799/xsh/fprintf.html
but it is *not* required by C99 as far as I can tell.  I don't see any
mention of support for it in my HPUX fprintf man page, either.  So this
construct may not be as portable as we could wish.

There appear to be about 150 affected messages, in these files:

src/backend/po/pt_BR.po
src/backend/po/de.po
src/backend/po/es.po
src/backend/po/zh_CN.po
src/backend/po/tr.po
src/bin/pg_dump/po/zh_CN.po
src/bin/pg_dump/po/tr.po
src/bin/psql/po/zh_CN.po
src/bin/psql/po/zh_TW.po
src/bin/psql/po/tr.po
src/bin/scripts/po/zh_CN.po

I don't think we'll hold up release to fix this, but the affected
translators may want to think about whether they can avoid the problem
or not.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2005-01-17 19:44:08
Subject: Re: ARC patent
Previous:From: Bruce MomjianDate: 2005-01-17 19:37:44
Subject: Re: ARC patent

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2005-01-17 19:54:44
Subject: Re: [HACKERS] %2$, %1$ gettext placeholder replacement is not working under Win32
Previous:From: Nicolai TufarDate: 2005-01-17 19:20:22
Subject: Re: [HACKERS] %2$, %1$ gettext placeholder replacement is not working under Win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group