"Is't any way to fetch the records using the perl program? Kindly let me know your thoughts."
Using which Perl program? If it's something you've written if you post a short example script which demonstrates the problem.
Also, you've posted in the wrong section of the site. See Where should I post X?.
| [reply] |
When I used this § Symbol directly am not getting any value from the DB
Well, yeah, I'm not surprised. § is not a valid SQL command in any dialect I know off.
What is it what you did, and what result did you expect to get?
| [reply] [d/l] |
Investigate what character encoding the database expects to be sent (probably utf-8), and what character encoding you're using.
In particular, make sure your files are saved in UTF-8, and contain the following line near the top:
use utf8;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
| [reply] [d/l] |
| [reply] [d/l] |
The "§" sign can be encoded as different byte values depending on the encoding the component uses ("code page" is another term you might be familiar with).
You have to find out (and make the same) all the different places where the encoding matters:
- Find out what encoding your database driver uses.
- Find out what encoding the database column values are in.
- Find out what encoding your SQL string in your Perl script uses.
- Find out what encoding your console uses to display strings. You can eliminiate that by replacing all bytes above \x7f with hexdumps in the output from your Perl script.
- Find out what encoding your HTML page declares. You can eliminiate that if you are not outputting HTML.
- Find out what encoding your HTML page is written in. You can eliminiate that if you are not outputting HTML.
- Find out what encoding your browser thinks the HTML page is in. You can eliminiate that if you are not outputting HTML.
My suggestion is to pull all places to input and output Unicde encoded as UTF-8, but that is not always possible. But at least declare in your ETL scripts and every place that reads or writes data what encoding is expected on input and what encoding is created on output.
| [reply] |