freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Castellano, Nicholas" <Nicholas_Castellano AT acml.com>
- To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] How to set locales.conf in spanish
- Date: Fri, 10 Jan 2003 12:57:36 -0500
Strings returned by getenv() should not be modified. FreeTDS should
strdup() first and modify the copy, then free() it later on.
Cheers,
--nick
-----Original Message-----
From: freetds-admin AT lists.ibiblio.org
[mailto:freetds-admin AT lists.ibiblio.org]
Sent: Friday, January 10, 2003 12:50 PM
To: freetds AT lists.ibiblio.org
Subject: Re: [freetds] How to set locales.conf in spanish
On 10 Jan 2003 09:08:10 -0800, Michael Peppler <mpeppler AT peppler.org>
wrote:
>
> > FreeTDS reads the LANG environment variable, and uses it as a key
> > into locales.conf. It expects a 5-character value in $LANG: 2
> > (lowercase) for the language, an underscore, and 2 (uppercase) for
> > the country.
>
> I got a weird result when I tried to mix DBD::FreeTDS (with freetds)
> and DBD::Sybase (with openclient) in the same perl script.
>
> If I loaded DBD::Sybase *after* DBD::FreeTDS I got an error from the
> Sybase locale handler, because suddenly LANG (or LC_ALL) was set to
> en_us instead of en_US (or at least the Sybase libs thought so).
This may be the culprit, in src/tds/locale.c
s = getenv("LANG");
if (s && strlen(s)) {
rewind(in);
for (i = 0; i < strlen(s); i++)
s[i] = tolower(s[i]);
tds_read_conf_section(in, s, tds_parse_locale, locale);
}
Perhaps your OS returns a pointer to the true environment string, not a
copy?
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org http://lists.ibiblio.org/mailman/listinfo/freetds
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.
-
RE: [freetds] How to set locales.conf in spanish,
ZIGLIO Frediano, 01/10/2003
- Re: [freetds] How to set locales.conf in spanish, Steve Langasek, 01/10/2003
- <Possible follow-up(s)>
-
RE: [freetds] How to set locales.conf in spanish,
ZIGLIO Frediano, 01/10/2003
-
Re: [freetds] How to set locales.conf in spanish,
Steve Langasek, 01/10/2003
-
Re: [freetds] How to set locales.conf in spanish,
Frediano Ziglio, 01/10/2003
-
Re: [freetds] How to set locales.conf in spanish,
Steve Langasek, 01/10/2003
-
Re: [freetds] How to set locales.conf in spanish,
Frediano Ziglio, 01/11/2003
- Re: [freetds] How to set locales.conf in spanish, James K. Lowden, 01/11/2003
-
Re: [freetds] How to set locales.conf in spanish,
Frediano Ziglio, 01/11/2003
-
Re: [freetds] How to set locales.conf in spanish,
Steve Langasek, 01/10/2003
-
Re: [freetds] How to set locales.conf in spanish,
Frediano Ziglio, 01/10/2003
-
Re: [freetds] How to set locales.conf in spanish,
Steve Langasek, 01/10/2003
-
RE: [freetds] How to set locales.conf in spanish,
Castellano, Nicholas, 01/10/2003
- Re: [freetds] How to set locales.conf in spanish, James K. Lowden, 01/10/2003
- RE: [freetds] How to set locales.conf in spanish, Brian Bruns, 01/10/2003
-
RE: [freetds] How to set locales.conf in spanish,
Eric Deutsch, 01/10/2003
- Re: [freetds] How to set locales.conf in spanish, Steve Langasek, 01/10/2003
-
Re: [freetds] How to set locales.conf in spanish,
James K. Lowden, 01/11/2003
- Re: [freetds] How to set locales.conf in spanish, Steve Langasek, 01/12/2003
- RE: [freetds] How to set locales.conf in spanish, Coleman, Dave, 01/12/2003
-
RE: [freetds] How to set locales.conf in spanish,
Coleman, Dave, 01/13/2003
- Re: [freetds] How to set locales.conf in spanish, Steve Langasek, 01/13/2003
- RE: [freetds] How to set locales.conf in spanish, Coleman, Dave, 01/13/2003
Archive powered by MHonArc 2.6.24.