Hi All, Please read Nicky's original e-mail -> SQL server. not My SQL
Nicky - I did not tried changing collation of an existing DB but I think that once you created the DB you cannot change the DB collation. Please check what is your collation - with SQL Server 2005 it is done using MS SQL Server management studio by right click on the db name and properties. also right click the server itself - the top object in the object explorer and check its collation - server collation it seems to be read only please write what the collation and will go from there Roey On Mon, Aug 3, 2009 at 2:13 PM, Yona Shlomo<[email protected]> wrote: > Hello, > > Unless you changed the default settings, mysql most probably > works in the Latin-1 (ISO8859_1) character encoding. > > What is the character encoding of your file? > > How are you displaying the results from your select > commant? (how did you conclude that the text is being > garbaged after insert?) > > > > -- > Shlomo Yona > [email protected] > http://yeda.cs.technion.ac.il/~yona/ > > On Mon, 3 Aug 2009, Nicky Pappo wrote: > >> 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(); > > _______________________________________________ > Perl mailing list > [email protected] > http://mail.perl.org.il/mailman/listinfo/perl > _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
