Re: setlocale not that ok...
[email protected] (Christos Zoulas)
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Organization | Astron Software |
| Message-ID | <[email protected]> |
On Jun 28, 4:51pm, [email protected] (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