Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] setlocale not that ok...
  • Date: Mon, 28 Jun 2010 16:51:04 +0200

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.

Regards
Frediano Ziglio




Archive powered by MHonArc 2.6.24.

Top of Page