Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: When using § symbol am not getting any value

by Corion (Patriarch)
on Apr 26, 2012 at 08:36 UTC ( [id://967268]=note: print w/replies, xml ) Need Help??


in reply to Re^2: When using § symbol am not getting any value
in thread When using § symbol am not getting any value

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.

  • Comment on Re^3: When using § symbol am not getting any value

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found