Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Encoding issue from DBI to string

by karlgoethebier (Priest)
on Jan 03, 2013 at 19:18 UTC ( #1011503=note: print w/ replies, xml ) Need Help??


in reply to Re: Encoding issue from DBI to string
in thread Encoding issue from DBI to string

"The use of placeholders is absolutely vital when using SQL..."

Nothing but the truth. But perhaps this is yet another communication problem.

I'm just wondering about what will happen when i try to force mysql_enable_utf8 => 1 in my DBI call when default-character-set=utf8 and default-collation=utf8_unicode_ci is not set in my.cnf...

For the moment i don't have any mySQL at the hand to check this.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»


Comment on Re^2: Encoding issue from DBI to string
Select or Download Code
Re^3: Encoding issue from DBI to string
by ev0lution (Initiate) on Jan 03, 2013 at 20:06 UTC
    Hey Karl, Upon looking in the my.cnf file, I had default-character-set = utf8 and collation-server = utf8_unicode_ci, however default-collation was not set. I made the necessary changes, but had to step into a meeting. I'll take a look at how things go in a bit.
Re^3: Encoding issue from DBI to string
by ev0lution (Initiate) on Jan 03, 2013 at 20:57 UTC
    Even after adding in the default-collation=utf8_unicode_ci, I'm still getting all question marks for multibyte characters. What a headache.

    Not sure if anyone who have the answer here, but assuming the DB is set up appropriate with all UTF-8 encoding and data appearing valid in the tables, it wouldn't really matter how it's getting into the database to begin with, right?

    We're using a 3rd party program as a scraper, and its underlying Java is dumping the data to the DB. I haven't looked into it much just because the data appears right in the DB with all UTF-8 encoding configured, so I assumed it wasn't the issue.

      "Even after adding in the default-collation..."

      S**t!

      "...it wouldn't really matter how it's getting into the database to begin with, right?

      To be honest, i'm not shure about this.

      BTW, what happens if you fire up your query using mysql client?

      Regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2014-12-29 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls