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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2005-01-17 19:44:08 Re: ARC patent
Previous Message Bruce Momjian 2005-01-17 19:37:44 Re: ARC patent

Browse pgsql-hackers-win32 by date

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