[freetds] How to set locales.conf in spanish
Steve Langasek
vorlon at netexpress.net
Fri Jan 10 19:37:25 EST 2003
On Fri, Jan 10, 2003 at 07:27:50PM -0500, James K. Lowden wrote:
> In short, I think locales.conf has yet to be used by anyone. We can
> eliminate it now. :(
> Then we have the problems of L10N and the LANG rat's nest. It could be
> two characters, or five, or the English name of the language (eg,
> "Spanish"). It might have a charset attached to it, delimited by '.' or
> '@' or no doubt something else. Futhermore, there's no rule that LANG has
> to be populated; the same information could come from ~./login_conf or
> something.
> I would like to use setlocale(3), but ANSI standardized the signature
> while saying nothing about its inputs or outputs. It gets us a step away
> from $LANG, but only a small amount closer to knowing what character set
> and language to tell the server to use.
Is portability to all ANSI platforms a requirement? What if locale
support was limited to SUSv2 platforms? With SUSv2, you don't have to
futz with the LANG variable at all; you call setlocale(), call
nl_langinfo(), and out pops an authoritative character set name.
I'm not certain how well-supported SUSv2 is; at the very least, I find
that nl_langinfo() is supported by MacOS X, NetBSD (since 1994 it
seems), FreeBSD, Linux, AIX (4.3), and Solaris -- in short, every Unix I
looked up info on supports this method. Are there other platforms I've
overlooked that people consider it important to have locale support on?
I'm strongly in favor of using nl_langinfo(), because it's really not
FreeTDS's business to map locales to character sets: it's the OS's
responsibility to do this, and as shown, OSes appear to be living up to
this.
--
Steve Langasek
postmodern programmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20030110/0851923c/attachment.bin
More information about the FreeTDS
mailing list