|
From: Jeff J. - S. <J_...@MC...> - 2008-04-15 18:07:48
|
Hey! I found the problem!
In fbqa.py, here is the call to __RunProgram call in
__ExecISQLCommandsBlind:
stdout, stderr=
self.__RunProgram(self.isql_script.encode('utf-8'),[self.__context["isql
_path"],
self.__dsn,
"-user", self.user_name,
"-password", self.user_password])
And here is the call in __ExecISQLCommands:
stdout, stderr=
self.__RunProgram(self.source_code.encode('utf-8'),[self.__context["isql
_path"],
self.__dsn,
"-ch", self.character_set,
"-user", self.user_name,
"-password", self.user_password])
When I commented out the "-ch" parameter in the second call, my test
worked. I don't quite understand why, but I am not going to question it
just yet.
Can you tell my why this would work?
Jeff
-----Original Message-----
From: fir...@li...
[mailto:fir...@li...] On Behalf Of Pavel
Cisar
Sent: Monday, April 14, 2008 08:56 AM
To: fir...@li...
Subject: Re: [Firebird-test] Test will not connect to database (rather
long)
Hi Jeff,
I'm sorry for late answer, but I haven't enough time to dig deep into
your problem till now.
1. I can't reproduce your problem, although I tried very hard.
2. I think that I have solved it anyway :-)
It seems that certain Windows XP boxes have trouble with unicode. I have
failed to pinpoint it down to exact configuration, hence the vague
description, but it's for real. Anything older than WinXP can fail
miserably with unicode, but XP and newer should work just fine (and
mostly do) except when they don't. It seems that your Windows have
problem passing unicode strings as parameters for spawned process. The
solution should be simple, just call encode method on all parameter
values passed to __RunProgram in __ExecISQLCommandsBlind and
__ExecISQLCommands. Example:
def __ExecISQLCommandsBlind(self):
try:
stdout, stderr=
self.__RunProgram(self.isql_script.encode('utf-8'),[self.__context["isql
_path"],
self.__dsn,
"-user", self.user_name,
"-password", self.user_password])
change to:
def __ExecISQLCommandsBlind(self):
try:
stdout, stderr=
self.__RunProgram(self.isql_script.encode('utf-8'),[self.__context["isql
_path"],
self.__dsn,
"-user", self.user_name.encode(),
"-password", self.user_password.encode()])
This should encode parameters to ASCII by default. You can pass the
charset name to the encode if you want something else.
best regards
Pavel Cisar
IBPhoenix
------------------------------------------------------------------------
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
_______________________________________________
Firebird-test mailing list
Fir...@li...
https://lists.sourceforge.net/lists/listinfo/firebird-test
|