perl DBD::CSV and non-printing ASCII

From: Amonotod (amonotod_at_charter.net)
Date: 06/24/04


To: <dbi-users@perl.org>
Date: Thu, 24 Jun 2004 17:26:57 +0000

So, I'm writing a database population script that parses (sic) CSV
files, breaks the input into fields, and then pops it into an RDBMS
(MSSQL, Oracle, Sybase) or Access.

Everything works fine, provided that I my input data is not the exact
length of the destination field while containing non-printable chars.
 I have for example, a varchar (255) field, into which I want to put a
string that contains 253 chars (including spaces) and two bell
characters.

The bell characters are interpolated by the apps that use the RDBMSs as
carriage return/new lines. Why not use actual \r\n chars? Uhhmmm..... I
dunno... The apps aren't mine, and they're not going to change just because I
asked them to do so...

When I use any other data loader (BCP, for example) the chars go straight in.
When I use my script, the bell chars get changed, I'm guessing, to Unicode.

Now, I saw that the Text::CSV_XS module has a "binary" switch, and that
DBI::CSV has a csv_csv meta-data parameter. Do I use this to get the "binary"
parameter passed through? Pray tell, how?

Thank you,
amonotod

    `\|||/ amonotod@ | subject line:
      (@@) charter.net | no perl, no read...
  ooO_(_)_Ooo________________________________
  _____|_____|_____|_____|_____|_____|_____|_____|



Relevant Pages

  • Re: Apps on the icon bar
    ... you'd just put!XChars into $.Apps and you'd find it in the iconbar apps ... Sadly, because of how ROM builds happen, even if you unplug the!Chars ... actually want into the harddisc Apps directory. ...
    (comp.sys.acorn.apps)
  • Re: Apps on the icon bar
    ... included is!Chars. ... I know how to add applications to this window but how do you remove ... command I could run in my own boot file to remove it from apps. ...
    (comp.sys.acorn.apps)
  • Re: char and au size
    ... AFAIK the only Forths with 1 CHARS 1 are those that tried to use Unicode ... Forth for Marc4, was never updated for ANS Forth compatibility. ... The Marc4 was/is a very interesting CPU. ... be used in automotive wireless key apps. ...
    (comp.lang.forth)
  • KDE internationalization on a GNOME desktop
    ... I run a couple of Qt apps, and accent chars don't work as "dead ... I guess keyboard layout info is ... Is there any way to configure Qt apps without having to install KDE? ...
    (Fedora)