Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: DBIx returns question marks

by moritz (Cardinal)
on Aug 07, 2011 at 10:03 UTC ( [id://919049]=note: print w/replies, xml ) Need Help??


in reply to DBIx/DBI returns question marks

What version of DBD::mysql do you have installed on both machines? What locales are in effect on both machines?

Replies are listed 'Best First'.
Re^2: DBIx returns question marks
by stepamil (Acolyte) on Aug 07, 2011 at 11:00 UTC

    I've just tried connecting staging machine to dev DB and in didn't work. "?????" all over the place.

      You never explicitly encode your output when you print it, so my guess is that you either have different locales on the machines, or use different terminal settings between the two machines. You can check whether the output of your program is good by hexdumping the output instead of printing raw bytes:

      perl -w myprogram | od -x

      If the output is the same between the two environments, then the problem is in your terminal settings, installed fonts or something like that. If the output is different, one problem happens somewhere earlier, maybe when writing to the database, reading from the database or outputting the data from your program.

        OK, so locales checked = same, I've set the script to write into a text file. On dev machine I got correct chinese characters, but on staging I got question marks again

        Interesting part is that spanish and german special characters work on both machines

Re^2: DBIx returns question marks
by stepamil (Acolyte) on Aug 07, 2011 at 10:19 UTC

    On both machines DBD::mysql is 4.018 and as for locals both have the pretty much the same, but the dev machine has DB locally and DB for staging is on another DB dedicated machine. Hm, I'll try to play with using different DBs just to see what will come of it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-25 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found