homepage Welcome to WebmasterWorld Guest from 54.226.80.55
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
same doctype, declaration different output
html chars not shown correctly
abushahin




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

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.

 

lucy24




msg:4471621
 4:54 am on Jul 2, 2012 (gmt 0)

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?

g1smd




msg:4471645
 6:43 am on Jul 2, 2012 (gmt 0)

Have you run the code through the W3C HTML validator?
Fixing any reported errors there has to be the fist step.

abushahin




msg:4471867
 6:12 pm on Jul 2, 2012 (gmt 0)

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

lucy24




msg:4471962
 12:11 am on Jul 3, 2012 (gmt 0)

?

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.

abushahin




msg:4472504
 2:43 pm on Jul 4, 2012 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved