I have a perl script to copy the contents to the db .
The db is set to default encoding LATIN1
While doing a copy to the db i set the client encoding to UTF8 using
$dbh->{pg_enable_utf8}=1;
$dbh->do("SET client_encoding TO 'UTF8'") or die "could not set the cl
+ient_encoding to UTF8 for $db_host $!";
However while doing the copy to the db i get the errors like
DBD::Pg::db pg_endcopy failed: ERROR: character 0xd7a4 of encoding "U
+TF8" has no equivalent in "LATIN1"
DBD::Pg::db pg_endcopy failed: ERROR: character 0xe4bea1 of encoding
+"UTF8" has no equivalent in "LATIN1"
and the culprit keywords look like this
ืครืกรืง
ืครืกรืง
ืครืกรืง
รยฉรยงรรืครยจ
รยฉรยงรรืครยจ
รยฉรยงรรืฉร
รยฉรยงรรืฉร
รยฉรยงรรย รยช รร
รยฉรยงรรย ื รยช
รยฉรยงรรย ื รยช
My question is how can i grep for these kind of keywords. I have checked the same keywords copy to a db set to SQL_ASCII and it works fine.
Can you please suggest me how i can grep for those characters
Thanks heaps
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.