|
From: Pavel C. <pc...@ib...> - 2008-04-14 15:56:32
|
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
|