Why is my character encoding different on 2 pages on the same website?
November 19, 2008 2:49 PM
Subscribe
Why are 2 different pages on the same website, showing the same data from the same database fields showing it differently (character encoding issue)?
I have a product detail page that is using UTF-8 encoding to show data about a product (there are hundreds of products- we'll use just one as the example here). If I change the encoding to ISO-8859-1, the character encoding symbols show up where there are uumlauts, trademarks, etc. So, this page works on UTF-8.
When the user clicks a link on that page that pops up a print version of the same page, showing the same data organized differently for a better printable format, the page shows the encoding symbols when using UTF-8 and shows the text just fine when using ISO-8859-1. The exact reverse.
Same website, same server, same database, same table, same fields, why would this be happening?
posted by Chuck Cheeze to computers & internet (7 comments total)
1 user marked this as a favorite
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?xml version="1.0" encoding="iso-8859-1"?>
Then inspect the HTTP headers sent for each page (there are Firefox extensions that let you do this) and your database setup, and resolve any conflicts.
posted by expialidocious at 3:09 PM on November 19, 2008