Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: coopster & jatar k

same doctype, declaration different output

html chars not shown correctly

   
12:06 am on Jul 2, 2012 (gmt 0)

5+ Year Member



Hi
I have this ' in my database so when it is output by html it should show '

which it does with this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>new title</title>
<meta name="Author" content="blah@example.com"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-language" content="en-gb"/>


But i have this in my index which is the same:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" >
<head>
<title>new title</title>
<meta name="Author" content="blah@example.com"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-language" content="en-gb"/>



but it isn't rendering correctly, any ideas/suggestions much appreciated.
4:54 am on Jul 2, 2012 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



The second version has two language declarations, "en" and "en-gb", in two different places.

Crystal ball is in the shop, so can you be a little more specific about what "isn't rendering correctly" means? Blank space, printed as-is, wrong kind of apostrophe, something else that I haven't thought of?
6:43 am on Jul 2, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Have you run the code through the W3C HTML validator?
Fixing any reported errors there has to be the fist step.
6:12 pm on Jul 2, 2012 (gmt 0)

5+ Year Member



Thanks for the replies!
yes it has been checked through w3c validator and it's fine, as for what it renders, this is what it being output
but the other pages it's fine
12:11 am on Jul 3, 2012 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



?

That has got to be an encoding problem. The leading is something you see very often when a unicode character from the E2 range (three bytes) is reinterpreted as Latin1 (three characters, beginning with E2 which is ).

If your plain apostrophe is getting re-cast as a curly apostrophe, that's E28098 or E28099. Now, the 8x and 9x series aren't used in Latin-1, but they are permitted in Windows-Latin-1. And in Windows-Latin-1, 80 is

:: drumroll ::



I'd be happier if it were followed by or (tilde or "trademark" sign) which are 98 and 99 in Windows-Latin-1, but, oh well.
2:43 pm on Jul 4, 2012 (gmt 0)

5+ Year Member



Thank you for the answers, I guessed it was an enconding problem.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month