Hello.

I am not sure... How it comes changing this line to next lines?
> $Text = 'german text';          #### text to insert

> $Text = 'german text';          #### text to insert
> use Encode qw/decode/;
> $Text = decode('iso-8859-?', $Text);

? for your encoding.


On Wed, 6 Feb 2008 12:00:50 +0100
VDI Freemail <[EMAIL PROTECTED]> wrote:

> I would like to enter data for the database over the Tk surface. There
>  is no problem if the data are created in the program. If I enter
>  German characters with entry in Tk, wrong characters are written in
>  the database.
> Can anybody help me?
> yours sincerely
> Manfred
> 
> #
> use DBI;
> $DBname = 'PHOENIX';
> $Benutzername = 'username';
> $PW = 'password';
> $dbh = DBI->connect("dbi:Oracle:$DBname", $Benutzername, $PW )
>                     || die "Kann nicht mit der Datenbank verbinden:
>  $DBI::errstr";
> 
> use Tk;
> $top = MainWindow->new(-title => 'Test german characters');
> 
> $Text = 'german \xE7〓〓゜ ト ヨ ワ';          #### text to insert
> 
> $top->Entry(-state => 'normal', -width => 70,
>             -font => '{Arial} 10 normal roman',
>             -textvariable => \$Entryvar,
>            )->pack();
> $top->Button(-text => 'Data from entry',
>                   -background => 'yellow1',
>                   -command => sub{&Daten_aktualisieren($Entryvar)}
>                  )->pack();                                           
>                    # inserts "german テ、 テカ テシ テY テソ テソ テソ"
> $top->Button(-text => 'Data from program',                            
>     ####  wrong
>                   -background => 'yellow1',
>                   -command => sub{&Daten_aktualisieren($Text)}
>                  )->pack();                                           
>                         # inserts "german \xE7〓〓゜ ト ヨ ワ"
> MainLoop;                                                             
>                       ###### OK
> 
> sub Daten_aktualisieren
> { $t=$_[0];
>  $sql =  "UPDATE ARSTAMM_BEZ SET TEXT2 = '$t' WHERE ARTNR = 'testmm   
>          ' ";
>   print "$sql\n";
>   $sth_DATA = $dbh->prepare($sql);
>   $rc = $sth_DATA->execute();
>   if ( $rc )
>     {print  "OK\n";}
>   else
>     {print "Error $sql\n" . $dbh->errstr . "\n"; }
> return;
> }
> 
> 
> 
> _______________________________________________
> ActivePerl mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
> __________ NOD32 2852 (20080206) Information __________
> 
> This message was checked by NOD32 antivirus system.
> http://canon-sol.jp/product/nd
> 

--------------------------------------------------------------------- 
gpg public key
https://hagi.ir-alt.co.jp/home/nomura/public-nomura.asc

野村 <[EMAIL PROTECTED]>
---------------------------------------------------------------------

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to