Yes, there is something in Python.
I blogged about this subject almost two years ago.  See:
http://www.zak.co.il/tddpirate/2007/12/25/choosing-a-python-module-for-accessing-microsoft-sql-server-unicode-data/

--- Omer


On Mon, 2009-08-03 at 14:00 +0300, Avishalom Shalit wrote:
> http://www.perlmonks.org/?node_id=719216
> was useful for me.
> especially the iconv tip (but i was going the other way , exporting
> from mssql, which gives utf-16 files )
> 
> 
> if that doesn't work, there's probably something in python ;-)
> -- vish
> 
> 
> 
> 2009/8/3 Nicky Pappo <[email protected]>:
> > Hi,
> > I am trying to read a file (Hebrew characters), and store data from it
> > thought DBI into SQL server.
> > Characters are garbaged after the Insert command.
> > Any ideas?
> >
> > Thanks Nicky Pappo
> > [email protected]
> >
> >
> > Here the relevant piece from the code:
> >
> >
> > #!/usr/bin/perl
> >
> > use strict;
> > use DBI;
> >
> >
> > my $dbconnect="SQLEXPRESS";  #the odbc connection
> > my $paramvalue = "";
> > my $filename="1";
> > my $paramtype="type";
> > my $sqlstatement;
> >
> > open(DAT, "test.txt" ) || die("Could not open file!");
> > binmode DAT, ":utf8";
> > while (<DAT>){
> >    $paramvalue .= $_;
> > }
> >
> >
> > my $dbh = DBI->connect("dbi:ODBC:$dbconnect");
> >
> >
> > $sqlstatement= "insert into parameters
> > (filename,ParameterType,ParameterValue)
> > values('$filename','$paramtype',N'$paramvalue')";
> > #setUTF8($sqlstatement);
> > my $sth = $dbh->prepare($sqlstatement);
> > $sth->execute();
-- 
$ python
>>> type(type(type))
<type 'type'>          My own blog is at http://www.zak.co.il/tddpirate/
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html

_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to