From: Álvaro G. Vicario on
El 21/04/2010 15:31, George K. escribi�/wrote:
> Thank you guys, I meant to write a response yesterday once I found the
> solution but I was too tired :).
>
> I found reading material about oracle's charsets and I run into all
> the different NLS options. Armed with that I was able to determine
> the connection options I have to setup in Perl in order to match the
> client with the server.
>
> Here are a few more details on the problem:
> 1) I am reading from an Informix table containing zlib compressed data
> stored in a lvarchar.
> 2) I need to store them in a mirror image table without losing
> integrity of the data because I can no longer un-compress them.
>
> The solution was finding an appropriate charset that will not messup
> the compressed data

Er... The solution for storing binary data is BLOB, isn't it?




--
-- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programaci�n web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
From: George K. on
On Apr 21, 7:08 am, "Álvaro G. Vicario"
<alvaro.NOSPAMTH...(a)demogracia.com.invalid> wrote:
> El 21/04/2010 15:31, George K. escribió/wrote:
>
>
>
> > Thank you guys, I meant to write a response yesterday once I found the
> > solution but I was too tired :).
>
> > I found reading material about oracle's charsets and I run into all
> > the different NLS options.  Armed with that I was able to determine
> > the connection options I have to setup in Perl in order to match the
> > client with the server.
>
> > Here are a few more details on the problem:
> > 1) I am reading from an Informix table containing zlib compressed data
> > stored in a lvarchar.
> > 2) I need to store them in a mirror image table without losing
> > integrity of the data because I can no longer un-compress them.
>
> > The solution was finding an appropriate charset that will not messup
> > the compressed data
>
> Er... The solution for storing binary data is BLOB, isn't it?
>
> --
> --http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programación web:http://borrame.com
> -- Mi web de humor satinado:http://www.demogracia.com
> --

Yes more often than not it is--but in our case we make sure we escape
all those \0 \\ characters that may messup the data when stored in a
varchar2. I also believe blobs add overheard both in space and in
performance to the DB. Moreover, it is also a matter of, if its done
in informix why can't be done in Oracle. :)

Thanks again for your responses.
George
From: joel garry on
On Apr 21, 6:31 am, "George K." <kara...(a)gmail.com> wrote:
> Thank you guys, I meant to write a response yesterday once I found the
> solution but I was too tired :).
>
> I found reading material about oracle's charsets and I run into all
> the different NLS options.  Armed with that I was able to determine
> the connection options I have to setup in Perl in order to match the
> client with the server.
>
> Here are a few more details on the problem:
> 1) I am reading from an Informix table containing zlib compressed data
> stored in a lvarchar.
> 2) I need to store them in a mirror image table without losing
> integrity of the data because I can no longer un-compress them.
>
> The solution was finding an appropriate charset that will not messup
> the compressed data, I was only able to achive this with the
> WE8ISO8859P9 charset and here's how I used it:
>
>   my $dbhOracle = DBI->connect('dbi:Oracle:'.$dbname,$user,$password,
>                       {
>                         'RaiseError' => 0,
>                         'AutoCommit' => 0,
>                         'PrintError' => 0,
>                         'ora_charset'=> 'WE8ISO8859P9',
>                       })
>     || Carp::croak(DBI->errstr);
>
> Thank you again for your help, much appreciated.
>
> George

I'm not sure if this is an issue for you, but there's a possibility
any time Oracle has to make a character conversion it may do so. I
don't recall if there is a P9 to AL32UTF8 issue, but something is
tickling the back of my brain that there are some obscure issues -
maybe having to do with the Euro sign? I know I've seen docs about
it, just can't remember the details. If you are relying on no
translation or strict supersets to do what you want (ie, nothing) with
binary data, you might have obscure intermittent problems. See the
docs or google about the csscan utility, you can use it to see if your
existing data is susceptible. But perhaps it isn't existing data you
have to worry about. Maybe you can make a quick test of storing all
characters and using the utility to see. If you are converting, you
have to be careful that all tools do the same conversion - this is a
classic issue with imp/exp.

As far as why Informix can do something Oracle can't... my search for
lvarchar at ansi.org yielded no results :-)

jg
--
@home.com is bogus.
http://www.twominutenews.com/2010/technology/apple-earnings-have-increased-8549.html