Non-ASCII text
Posted in 2003
Topics: Security, Permissions & Auditing
Hi all.
I have two Informix servers -- a production box and a test box. Passwords
to our vendor's software are stored encrypted in a char(20) column. I want
to copy passwords from production to test. I've written a perl script to
fetch the password from production and I want to put that password into the
same table/column on the test box. The problem is that the encrypted
passwords have non-ascii characters.
update user_mst set access_code = "blahblah" where id="235112"
This update command gives me this:
DBD::Informix::db do failed: SQL: -202: An illegal character has been found
in the statement. at ./3000create.pl line 27.
How can I copy the contents of one char column to another if the data
contains "illegal characters" ??
Thanks,
Brian McLaughlin
George Fox University
(503) 554-2587
In message <bb5s4p12rh9@enews2.newsguy.com>, Brian McLaughlin
<bmclaugh@georgefox.edu> writes
>Hi all.
>
>I have two Informix servers -- a production box and a test box. Passwords
>to our vendor's software are stored encrypted in a char(20) column. I want
>to copy passwords from production to test. I've written a perl script to
>fetch the password from production and I want to put that password into the
>same table/column on the test box. The problem is that the encrypted
>passwords have non-ascii characters.
>
>update user_mst set access_code = "blahblah" where id="235112">
>This update command gives me this:
>DBD::Informix::db do failed: SQL: -202: An illegal character has been found
>in the statement. at ./3000create.pl line 27.
>
>How can I copy the contents of one char column to another if the data
>contains "illegal characters" ??
>
>Thanks,
>
>Brian McLaughlin
>George Fox University
>(503) 554-2587
>
>
>
>
>
If the encrypted data is stored ok in one database, then it should store
ok in the other.
Have you checked that your script isn't trying to interpret the data. I
have no experience of perl, but with tcl you need to be careful if, for
example, the data contains the " character and you also use "" to
delimit the text. You may need to parse the encrypted data and escape
'dodgy' characters with \\
eg. update xx set yy = "abcd\\"efgh" where zz = "jim"
--
Andrew Lennard andy@kontron.demon.co.uk