CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: DBI:
Unicode help


New User

Jan 12, 2008, 11:54 AM

Post #1 of 1 (3680 views)
Unicode help Can't Post

Before I begin to explain my problem, I just want to say that I can do the following two things:

1. Using Perl, connect to a MS Access Databse Table and perform the required operations.(Database is in English language)
2. I can read and write UTF8 text files using Perl.

The following code explains how do I write UTF8 files.:

#open (FH,">:utf8",$outfile);




print "$_"."\n";

if($_ == /\x{0932}/)

print "L";
$strvar="\x{0932} \x{0917}";
print $strvar."done"."\n";
#print FH $strvar."\n";

Here, I am reading from one UTF8 file and writing to another UTF8 file. Also, in the new UTF8 file I am adding two more characters whose hex values are there in the variable "strvar" as can be seen in the program. Now when I see this file in Wordpard or Notepad everything is fine.

Now I come to my question.
I have enabled Hindi Language/Internationalization support on my machine. If I directly try to write Hindi to the tables in MS Access, I am able to do that. Now the problem is that when I try to insert a string into MS Access from Perl whose Hex value(Unicode) is \x{0932} it does not appear correctly in the table. The Character that should appear corresponding to 0932 Hex is shown below(You can see this if you have Unicode support on your machine).

However, instead of the above character, some garbled character is displayed on the screen. I dnt know how to insert unicode characters into MS Access from Perl(That is issuing a insert query from Perl to insert unicode strings). I need urgent help on this. I would really appreciate if someone could help me out.

thanks in advance.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives