#117 locale enhacements for ct-lib

closed-accepted
nobody
ct-lib (14)
5
2007-06-25
2007-06-01
David Nichols
No

This patch contains support for:
cs_loc_alloc()
cs_loc_drop()

also cs_locale():
CS_SET and CS_GET for:
CS_LC_ALL (only when buffer = 0, CS_SET only)
CS_SYB_CHARSET, CS_SYB_LANG, CS_SYB_LANG_CHARSET

for CS_SYB_SORTORDER I do not know how to set this in the relevant tds structure, so it's commented out for now.

also cs_con_props()
support for CS_SET and CS_GET for CS_LOC_PROP

with this patch you can successfully set the connection encoding and language, however only separately with cs_locale; not with CS_LC_ALL, as I'm not sure how to handle that.

I've tested all supported cases, also with valgrind for memory leaks.

It's working for me at least. I am not setting TDSCONNECTION.client_charset however, only server_charset; I'm not sure if this could lead to errors or not?

The patch was created from the cvs version of freetds using cvs patch -u

thanks,
David

Discussion

    • status: open --> closed-accepted
     
  • Logged In: YES
    user_id=75766
    Originator: NO

    applied