freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent
- Date: 16 Mar 2003 09:15:30 +0100
Il dom, 2003-03-16 alle 05:01, James K. Lowden ha scritto:
> On Sat, 15 Mar 2003 18:41:59 -0800 (PST), Aliet Santiesteban Sifontes
> <alietss AT yahoo.com> wrote:
> > Hi James this is my log file... I can see that the
> > charset is empty...How could I know my charset??
> > And how is the sintaxis to do it in the freetds.conf
> > file.
>
> client charset = ISO-8859-1
>
> should do the trick.
>
> Oh oh oh. Red Hat 8.0 you say? What does locale(1) return for you?
>
> I think RH8 comes set up for UTF-8 out of the box. This could be tricky,
> because I don't think FreeTDS or PHP are completely ready for UTF-8.
>
> --jkl
>
Mmmm...
$ grep -n client_charset `find -name \*.[ch]`
./src/tds/config.c:439: tds_dstr_copy(&connect_info->client_charset,
value);
./src/tds/login.c:238: if (connect_info->client_charset) {
./src/tds/login.c:239: tds_iconv_open(tds,
connect_info->client_charset);
./src/tds/mem.c:515: tds_dstr_init(&connect_info->client_charset);
./src/tds/mem.c:679: tds_dstr_free(&connect_info->client_charset);
./include/tds.h:572: char *client_charset;
So, client charset is used only converting from unicode, not for other
charset...
$ grep -n char_set `find -name \*.[ch]`
./src/pool/util.c:77: fprintf(stderr, "char %s\n", login->char_set);
./src/server/login.c:134: tds_read_string(tds, &login->char_set, 30);
./src/server/login.c:224: tds_dstr_copy(&login->char_set, "");
/*empty
char_set for TDS 7.0 */
./src/server/unittest.c:86: printf("char %s\n", login->char_set);
./src/tds/config.c:437: tds_dstr_copy(&connect_info->char_set, value);
./src/tds/config.c:480: if (!tds_dstr_isempty(&login->char_set)) {
./src/tds/config.c:481: tds_dstr_copy(&connect_info->char_set,
login->char_set);
./src/tds/locale.c:89: if (locale->char_set)
./src/tds/locale.c:90: free(locale->char_set);
./src/tds/locale.c:91: locale->char_set = strdup(value);
./src/tds/login.c:160: tds_dstr_copy(&tds_login->char_set, charset);
./src/tds/login.c:519: tds_put_login_string(tds, connect_info->char_set,
TDS_MAX_LOGIN_STR_SZ); /* charset */
./src/tds/mem.c:505: tds_dstr_init(&connect_info->char_set);
./src/tds/mem.c:528: if (locale->char_set)
./src/tds/mem.c:529: if
(!tds_dstr_copy(&connect_info->char_set,locale->char_set))
./src/tds/mem.c:536: if (tds_dstr_isempty(&connect_info->char_set)) {
./src/tds/mem.c:537: if
(!tds_dstr_copy(&connect_info->char_set,TDS_DEF_CHARSET))
./src/tds/mem.c:563: tds_dstr_init(&tds_login->char_set);
./src/tds/mem.c:599: tds_dstr_free(&login->char_set);
./src/tds/mem.c:665: if (locale->char_set) free(locale->char_set);
./src/tds/mem.c:674: tds_dstr_free(&connect_info->char_set);
./include/tds.h:523: char *char_set; /* ie iso_1 */
./include/tds.h:550: char *char_set; /**< charset of server */
./include/tds.h:586: char *char_set;
While char_set is the character to be issued to the server...
I think our program should set only client charset and libtds should
select proper translation according to the nearest charset.
Also we should translate single-byte characters, not only unicode...
tsql on my machine say:
Cannot find the requested character set in Syscharsets: name =
'ANSI_X3.4-1968'.
Msg 2411, Level 10, State 1, Server , Line 0
No conversions will be done.
After some research ANSI_X3.4-1968 is better known as US-ASCII.
Sybase doc state that client charset (in dblib) default setting depend
from platform (ie: roman8 for HP/UX, many other iso_1)
freddy77
-
[freetds] Strange assert,
Frediano Ziglio, 03/15/2003
-
Re: [freetds] Strange assert,
James K. Lowden, 03/15/2003
- Re: [freetds] Strange assert, James K. Lowden, 03/15/2003
-
[freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
Aliet Santiesteban Sifontes, 03/15/2003
-
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
James K. Lowden, 03/15/2003
-
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
Aliet Santiesteban Sifontes, 03/15/2003
-
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
Aliet Santiesteban Sifontes, 03/15/2003
-
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
James K. Lowden, 03/15/2003
- Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent, Frediano Ziglio, 03/16/2003
- Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent, Aliet Santiesteban Sifontes, 03/17/2003
- Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent, Aliet Santiesteban Sifontes, 03/21/2003
-
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
James K. Lowden, 03/15/2003
-
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
Aliet Santiesteban Sifontes, 03/15/2003
-
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
Aliet Santiesteban Sifontes, 03/15/2003
-
Re: [freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent,
James K. Lowden, 03/15/2003
- <Possible follow-up(s)>
-
Re: [freetds] Strange assert,
Rusty Wright, 03/17/2003
- Re: [freetds] Strange assert, Frediano Ziglio, 03/17/2003
- RE: [freetds] Strange assert, Lowden, James K, 03/17/2003
- Re: [freetds] Strange assert, Rusty Wright, 03/18/2003
-
Re: [freetds] Strange assert,
James K. Lowden, 03/15/2003
Archive powered by MHonArc 2.6.24.