Skip to Content.
Sympa Menu

freetds - Re: [freetds] setlocale not that ok...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: christos AT zoulas.com (Christos Zoulas)
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] setlocale not that ok...
  • Date: Mon, 28 Jun 2010 11:48:29 -0400

On Jun 28, 4:51pm, freddy77 AT gmail.com (Frediano Ziglio) wrote:
-- Subject: [freetds] setlocale not that ok...

| Hi,
| I think that calling setlocale in a library with locale != NULL is
| mainly a bad idea. Doing setlocale change global settings that should
| be done by the application not by a library. Setting locale changes
| subtle things like sprintf witch application should be prepared to
| handle.
|
| I think we should remove setlocale(LC_ALL, "") in src/tds/mem.c and
| src/tds/locale.c. Applications like tsql, bsql and similars should
| call setlocale by themselves.

I agree, but make sure that you move the calls there, otherwise people
are going to get an unpleasant surprise :-)

christos




Archive powered by MHonArc 2.6.24.

Top of Page