in reply to Re: MS Access Input -> Japanese Output
in thread MS Access Input -> Japanese Output
Thank you very much for your reply. I decided to take the obscurity of the terminal window out of the picture and am now trying to generate it as a html page to view in Firefox.
This is all being done on Windows XP Professional.
At the moment I can do this with output to Firefox:
1) Using ASP and MS Access - OK!
2) Using ASP and MySQL - question marks.
3) Using Perl and MS Access - question marks.
4) Using Perl and MySQL - question marks.
So naturally I would like to do this with Perl and MySQL. When looking at the data in MySQL with a GUI like NaviCat I can see all the Japanese characters no worries. As part of the MySQL my.ini file i have amongst others, the following settings:
# The default character set that will be used when a new schema or table is created and no character set is defined
default-character-set=utf8
As part of the client section I have:
default-character-set=utf8
Also using something like 'MySQL Query Browser' I can again see the Japanese characters when I perform a simple query such as "SELECT kana, kanji FROM vocab".
I must admit a lot of what you said went straight over my head and I didn't really understand it.
I am sorry to say but I have no idea how to do this:
"To do so, let your perl program create HTML entity representations of the unicode characters, and embed those into some HTML page. For the purpose at hand, the 'ODEPOINT-IN-HEX;' form is easiest to generate."
Here is the code I am currently using:
use DBI; use CGI qw/:standard :html3/; use CGI::Carp qw(fatalsToBrowser); my $query = CGI -> new; print header(-charset=>'utf-8'); my $dbh = DBI->connect('DBI:ODBC:japmysql','','') or die "Cannot conne +ct: $DBI::errstr\n"; my $sth = $dbh->prepare('Select English, Kana, Kanji from Vocab') or die("Couldn't prepare"); $sth->execute or die ("Could not execute SQL statement."); if($sth->rows == 0) { print "No information."; } else { print "<table border=1>\n"; while( $resptr = $sth->fetchrow_hashref() ) { print "<tr>"; print "<td>" . $resptr->{"English"}; print "<td>" . $resptr->{"Kana"}; print "<td>" . $resptr->{"Kanji"}; print "\n"; } print "</table>\n"; } print "</body></html>\n"; $dbh->disconnect;
Can you please show me what you mean using very short words? :)
Thanks again for all your help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: MS Access Input -> Japanese Output
by almut (Canon) on Nov 23, 2006 at 16:01 UTC | |
by Zettai (Acolyte) on Nov 23, 2006 at 17:23 UTC | |
by almut (Canon) on Nov 23, 2006 at 17:56 UTC | |
by Zettai (Acolyte) on Nov 23, 2006 at 18:51 UTC | |
by almut (Canon) on Nov 23, 2006 at 19:51 UTC | |
|