From: Marcos P. <ra...@ar...> - 2003-02-20 07:28:17
|
Hi there. ¿Is it possible to issue a query such as "select 'año' "? (in case it does not show, between the a and the o there is a n with a ~ on top, a very usual char in Spain/España). It works from tsql (include with freetds):: marcos@cynar:/usr/local/Webware/WebKit$ tsql -Scazalla -Usa locale is "es_ES@euro" charset is "ISO-8859-15" Password: Msg 5703, Level 0, State 1, Server CAZALLA, Line 0 Changed language setting to us_english. 1> select 'año' 2> go año =================== Using Python SELECT 'año' from usuarios Traceback (most recent call last): File "etcPythonSybase.py", line 227, in ? rs=con.lookup(sql) File "etcPythonSybase.py", line 203, in lookup cur,con=self.lookupRS(sql,params) File "etcPythonSybase.py", line 122, in lookupRS cur.execute(sql) File "/usr/lib/python2.2/site-packages/Sybase.py", line 381, in execute self._start_results() File "/usr/lib/python2.2/site-packages/Sybase.py", line 547, in _start_results status, result = self._cmd.ct_results() File "/usr/lib/python2.2/site-packages/Sybase.py", line 145, in _servermsg_cb raise DatabaseError(_fmt_server(msg)) Sybase.DatabaseError: Msg 105, Level 15, State 1, Line 1 Unclosed quotation mark before the character string 'a???????????????..?'.Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near 'a???????????????..?'. ==== I appreciate any pointers. The client is linux, freetds, the server is SQL2000. -- Marcos Sánchez Provencio <ra...@ar...> |
From: Dave C. <dj...@ob...> - 2003-02-20 18:09:45
|
>>>>> "Marcos" =3D=3D Marcos S=E1nchez Provencio <ra...@ar...> writes: |
From: Marcos P. <ra...@ar...> - 2003-02-21 03:46:13
|
This is the output (please let me know if I can help you (me :-) in any way. This is the interactive tsql session marcos@cynar:~/src$ tsql -Usa -Scazalla locale is "es_ES@euro" charset is "ISO-8859-15" Password: Msg 5703, Level 0, State 1, Server CAZALLA, Line 0 Changed language setting to us_english. 1> use personal 2> go 1> select 'año' 2> go año El jue, 20 de 02 de 2003 a las 00:09, Dave Cole escribió: > >>>>> "Marcos" == Marcos Sánchez Provencio <ra...@ar...> writes: > > ______________________________________________________________________ > > Marcos> Hi there. ¿Is it possible to issue a query such as "select > Marcos> 'año' "? (in case it does not show, between the a and the o > Marcos> there is a n with a ~ on top, a very usual char in > Marcos> Spain/España). > > Marcos> It works from tsql (include with freetds):: > > It might be instructive to turn on FreeTDS debug logging and then run > both the tsql and Sybase module again. > > The TDSDUMP environment variable specifies the name of a log file and > turns on debugging (I think). > > - Dave -- Marcos Sánchez Provencio <ra...@ar...> |
From: Marcos P. <msa...@gr...> - 2003-02-25 15:10:19
|
I should have tried first; it seems to work just by initialising the locale import locale locale.setlocale(locale.LC_ALL, '') El mi=E9, 19-02-2003 a las 13:28, Marcos S=E1nchez Provencio escribi=F3: > Hi there. >=20 > =BFIs it possible to issue a query such as "select 'a=F1o' "? (in case it > does not show, between the a and the o there is a n with a ~ on top, a > very usual char in Spain/Espa=F1a). >=20 > It works from tsql (include with freetds):: >=20 > marcos@cynar:/usr/local/Webware/WebKit$ tsql -Scazalla -Usa > locale is "es_ES@euro" > charset is "ISO-8859-15" > Password:=20 > Msg 5703, Level 0, State 1, Server CAZALLA, Line 0 > Changed language setting to us_english. > 1> select 'a=F1o' > 2> go >=20 > a=F1o >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Using Python >=20 > SELECT 'a=F1o' from usuarios=20 > Traceback (most recent call last): > File "etcPythonSybase.py", line 227, in ? > rs=3Dcon.lookup(sql) > File "etcPythonSybase.py", line 203, in lookup > cur,con=3Dself.lookupRS(sql,params) > File "etcPythonSybase.py", line 122, in lookupRS > cur.execute(sql) > File "/usr/lib/python2.2/site-packages/Sybase.py", line 381, in > execute > self._start_results() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 547, in > _start_results > status, result =3D self._cmd.ct_results() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 145, in > _servermsg_cb > raise DatabaseError(_fmt_server(msg)) > Sybase.DatabaseError: Msg 105, Level 15, State 1, Line 1 > Unclosed quotation mark before the character string > 'a???????????????..?'.Msg 170, Level 15, State 1, Line 1 > Line 1: Incorrect syntax near 'a???????????????..?'. > =3D=3D=3D=3D >=20 > I appreciate any pointers. The client is linux, freetds, the server is > SQL2000. >=20 > --=20 > Marcos S=E1nchez Provencio <ra...@ar...> >=20 > _______________________________________________ > Python-sybase mailing list > Pyt...@ob... > https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |