Re: SQL Server version and TDS Version

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Fri, Apr 30, 2010 at 02:58:12PM -0400, [email protected] wrote:
> 
> 1.  API call e.g. DBSETLCHARSET().
> 2.  freetds.conf. 
> 3.  nl_langinfo(3) /* query using CODESET parameter */
> 4.  setlocale(3) /* query using NULL parameter, split on "." */
> 5.  ISO 8859-1
> 
> None of this works today, as you know.  

It works even less now.  I committed changes to tds_alloc_locale() 
to get its initial values as I described.  glibc give a free backtrace 
error.  I'm sure it's right, but I've run out of time.  

The search-for-canonical has to stay, but the parsing of LANG has to go. 
tds_get_locale() looks mostly wrong, but it's a little hard to untangle. 
All that really has to happen is to canonicalize the value returned by 
tds_alloc_locale() and overwrite that with whatever is read from 
the configuration files.  

(The setlocale(3) stuff arguably should be in tds_get_locale().  I wouldn't 
argue if it got moved there.)  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.