SitePoint Sponsor

User Tag List

Results 1 to 23 of 23
  1. #1
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I'm in hell.....

    I runned it on my computer and the whole page worked fine...

    now i uploaded it to a server and the this start looking this way:



    What tha hell is this??

    If i, in my mozilla change the codification to ISO-8859-1 thing go back to normal, but with a refresh the errors appear again... its not my browser's problem, IE does the same, and other people on theyr computer see the same..

    Can you help me?

    Link: http://www.lisbonxtyle.com/
    Last edited by Lambda; Jan 10, 2007 at 14:20.

  2. #2
    SitePoint Enthusiast BurakUeda's Avatar
    Join Date
    Apr 2005
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is you charset set to?
    do you have this line in your headers:

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    H u m o
    Uncensored Forums for Intelligent People

  3. #3
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nop, it doesnt work..

    I think the problem is about this:



    How can i change it?

  4. #4
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is in the server, i past his code to the frontpage and the characters were normal there......... stupid server...


    Edit: or not.... arrrg!!! i dunno lol


    What the hell is going on?? :fear:
    Last edited by Lambda; Jan 9, 2007 at 09:56.

  5. #5
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone? :'(

  6. #6
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I still cant solve this...

    Im getting crazy!!! lol


    any idea?

  7. #7
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    809
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you paste your source code here? (only the HTML outputted to the browser will do)

  8. #8
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    809
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you paste your source code here? (only the HTML outputted to the browser will do)

  9. #9
    SitePoint Addict
    Join Date
    Nov 2006
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can find out it's html equivalent I use Mailto obfuscator and it translates them into for example &amp; and &123;

    But since it looks like a forum I wouldn't know how to make it so that it does it for everyone.

  10. #10
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    809
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  11. #11
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your server is probably configured to send content as UTF-8, while your page is in ISO-8859-1. Try installing live http-headers or similar extension in mozilla, and have a look at the headers from the server. Look for Content-Type: text/html; charset=UTF-8.

  12. #12
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The site is here: http://www.lisbonxtyle.com/


    I think nothing is wrong with the headers, because i pasted the html code into frontpage and the strange characters disapeared..

    The html is this:

    Code:
    <html>
    
    <head>
    
    <title>LisbonXtyle P&#225;gina Oficial</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    
    </head>
    
    <body bgcolor="#1F1F1F" link="#000000" vlink="#000000" alink="#FFFF00">
    
    <table border="1" width="800" id="table1" align = center style="border-collapse: collapse;" bordercolor=#000000 cellpadding="0" cellspacing="0">
    	<tr>
    		<td colspan="2" height="106">
    		<p align="center"><object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="anima?ao" align height="111" width="600" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
    	<param name="movie" value="animacao.swf">
    	<param name="quality" value="Low">
    	<param name="scale" value="NoBorder">
    	<embed src="animacao.swf" quality="High" name="anima?ao" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align height="111" width="600" scale="NoBorder">
    </object>
    </td>
    	</tr>
    	<tr>
    		<td width="85&#37;" bgcolor="#336699">
    		<p align="center"><font color="#FFFFFF"><b>Tel:</b> 123464565464 | <b>E-Mail:</b> hfghf@gfdg.fdgdf</font></td>
    		<td width="14%" bgcolor="#336699">
    		<p align="center"><b><font color="#FFFFFF">10-01-07</font></b></td>
    	</tr>
    	<tr>
    		<td colspan="2" bgcolor="#336699">
    		<p align="center"><font color="#FFFFFF"><marquee width=600>Frase emocionante que fa?a chorar o pessoal...</marquee></font></td>
    	</tr>
    </table>
    
    <br>
    
    <table border="1" width="800" id="table2" align = center style="border-collapse: collapse;" bordercolor =#000000 height="302">
    	<tr>
    		<td height="592" align="left" valign="top" bgcolor="#333333">
    		<table border="0" width="100%" id="table3" height="272" cellspacing="8">
    			<tr>
    				<td width="10%" align="left" valign="top">
    				<table border="1" width="100%" id="table4" align = center style="border-collapse: collapse;" bordercolor =#000000 >
    					<tr>
    						<td bgcolor="#336699"><font color="#FFFFFF"><b>&nbsp;: Menu :</b></font></td>
    					</tr>
    					<tr>
    						<td bgcolor="#C0C0C0"><a href="index.php?id=1"><span style="text-decoration: none; font-weight: 700">Eventos/Noticias</span><a/><br>
    						<a href="index.php?id=2"><span style="text-decoration: none; font-weight: 700">Galeria</span></a><br>
    						GuestBook<br>
    						Staff<br>
    						TheLisbonXtyle<br>
    						MailingList</td>
    					</tr>
    				</table>
    				</td>
    				<td width="65%" valign="top" align="left">
    				<table border="1" width="100%" id="table5" align = center style="border-collapse: collapse;" bordercolor =#000000>
    
    <tr>
    						<td bgcolor="#336699"><font color="#FFFFFF"><b>&nbsp;: Eventos :</b></font></td>
    					</tr>
    					<tr>
    						<td bgcolor="#C0C0C0">Site ainda em constru??o =)<br />
    <br />
    Volta em breve!</td>
    					</tr>
    				</table><br>
    				<table border="1" width="100%" id="table6" align = center style="border-collapse: collapse;" bordercolor =#000000>
    				<tr>
    						<td bgcolor="#336699"><font color="#FFFFFF"><b>&nbsp;: Noticias :</b></font></td>
    					</tr>
    					<tr>
    						<td bgcolor="#C0C0C0">
    					<font color="#336699"><b>Ja da para colocar fotos!</b></font><br>(2007-01-09 16:13:57)<br><br>A opcao de adicionar fotos ja funciona!!<br />
    <br />
    <br />
    Resta resolver este erro de caracteres...<br><hr width=80%><br>
    					<font color="#336699"><b>Pagina em constru?</b></font><br>(2007-01-08 16:09:33)<br><br>A p?gina est? a ser construida!<br />
    Aguardem pff. :)<br><hr width=80%><br>
    					<font color="#336699"><b>Teste</b></font><br>(0001-12-25 00:00:01)<br><br>gdfgfdgd g<br />
    fd gfd fdg df gfd  dfgfdgfdgfdg<br />
    fdgdf<br />
    gdf<br />
    gdfgfdgdfgfdgfdgfdg<br><hr width=80%><br></td>
    					</tr>
    				</table>
    				</td>
    			</tr>
    		</table>
    		</td>
    	</tr>
    	<tr>
    		<td height="75" bordercolor="#000000" bgcolor="#333333">
    		<p align="center"><font color="#FFFFFF" size="2">Designed by NeMewSys - 2007</font></td>
    	</tr>
    </table>
    
    </body>
    
    </html>

    I think the problem comes from the database, all tables are in latin1, but i have this configuration underlined, that i dont know how to change it.

    Last edited by Lambda; Jan 10, 2007 at 15:43.

  13. #13
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With HTML headers plugin i get:
    ...
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    ...
    Content-Type: text/html; charset=utf-8
    ....
    But... where am i missing on the html code?

  14. #14
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    Your server is probably configured to send content as UTF-8, while your page is in ISO-8859-1. Try installing live http-headers or similar extension in mozilla, and have a look at the headers from the server. Look for Content-Type: text/html; charset=UTF-8.
    yes i found that line (as you see in my previous reply), now what sould i do? before commiting a suicide.... lol

  15. #15
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http header
    http://www.lisbonxtyle.com/index.php?folder=3

    GET /index.php?folder=3 HTTP/1.1
    Host: www.lisbonxtyle.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: pt-pt,pt;q=0.8,en;q=0.5,en-us;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: session=C3SPeW8X3auZYaCrrA3TNTjB4q2yEkpPnIoSouxpUpO1PaqHitk5LSGPGIOV1Duo
    Cache-Control: max-age=0

    HTTP/1.x 200 OK
    Date: Wed, 10 Jan 2007 23:11:14 GMT
    Server: Apache/1.3.36 (Unix) mod_ssl/2.8.27 OpenSSL/0.9.7a PHP/4.4.2 mod_perl/1.29 FrontPage/5.0.2.2510
    X-Powered-By: PHP/4.4.2
    Keep-Alive: timeout=5, max=500
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=utf-8
    ----------------------------------------------------------

  16. #16
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, we definitely don't want any suicides.

    Your server sends the document as UTF-8 encoded text, although your document is actually ISO-8859-1 encoded. You can verify that this is true by selecting the menu View > Character Encoding. There will be a bullet next to UTF-8. If you select ISO-8859-1, your page will look as you intend it to.

    Normally, the browser will use the content-type header to determine what encoding your document is in. If the server doesn't send any headers, it will instead rely on a meta-tag in the document, if you supply one. If the server sends a content-type header, AND you have a meta-tag, then some browsers will attribute more authority to the meta-tag than the content-type, and some browsers will do the opposite. I therefore suggest that you don't rely on the meta-tag, but only on the actual headers sent. (Those are the ones you can see with live-headers).

    In your case, the server sends a content-type header, which says that the document is UTF-8, while the meta-tag specifies that encoding is ISO-8859-1. You can do one of two things to fix the problem: Either you configure the server to send ISO-8859-1 as the charset for your documents, or you change your documents to UTF-8. The first may be the easiest, since you only have to do it once for all your documents. There's a slight complication, if your documents are dynamically generated (Eg. they are PHP-documents). In this case, PHP can override the content-type header which the server sends. If this is the case, you can simply put a header-call at the very top of your PHP-document, similar to this:
    PHP Code:
    <?php
    header
    ("Content-Type: text/html; charset=ISO-8859-1");
    ?>
    This must be at the top of your script, since headers must be sent before any regular output is sent - otherwise the servers default content-type is used (Which is UTF-8).
    Last edited by kyberfabrikken; Jan 11, 2007 at 15:59. Reason: rather confusing type on my behalf

  17. #17
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Coincidentally, there was an article published here at sitepoint, just yesterday, which explains charset issues. Have a look at that, if you want some more thorough explanation :
    http://www.sitepoint.com/article/gui...acter-encoding

  18. #18
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    Oh, we definitely don't want any suicides.

    Your server sends the document as UTF-8 encoded text, although your document is actually ISO-8859-1 encoded. You can verify that this is true by selecting the menu View > Character Encoding. There will be a bullet next to UTF-8. If you select ISO-8859-1, your page will look as you intend it to.

    Normally, the browser will use the content-type header to determine what encoding your document is in. If the server doesn't send any headers, it will instead rely on a meta-tag in the document, if you supply one. If the server sends a content-type header, AND you have a meta-tag, then some browsers will attribute more authority to the meta-tag than the content-type, and some browsers will do the opposite. I therefore suggest that you don't rely on the meta-tag, but only on the actual headers sent. (Those are the ones you can see with live-headers).

    In your case, the server sends a content-type header, which says that the document is UTF-8, while the meta-tag specifies that encoding is ISO-8859-1. You can do one of two things to fix the problem: Either you configure the server to send ISO-8859-1 as the charset for your documents, or you change your documents to UTF-8. The first may be the easiest, since you only have to do it once for all your documents. There's a slight complication, if your documents are dynamically generated (Eg. they are PHP-documents). In this case, PHP can override the content-type header which the server sends. If this is the case, you can simply put a header-call at the very top of your PHP-document, similar to this:
    PHP Code:
    <?php
    header
    ("Content-Type: text/html; charset=UTF-8");
    ?>
    This must be at the top of your script, since headers must be sent before any regular output is sent - otherwise the servers default content-type is used (Which is UTF-8).
    The server doesnt let me change to ISO-8859-1, i changed all the headers to utf8, and the database's tables to utf8, but the problem persists.

    This server uses 'DirectAdmin' to manage the configurations, if you know a way to change the character set, i didnt find it 'til now in any menu.

    direct admin web site: http://www.directadmin.com/


    But thanks anyway.

  19. #19
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry - That was a typo. You should put this in the top of your script:
    PHP Code:
    <?php
    header
    ("Content-Type: text/html; charset=ISO-8859-1");
    ?>
    Otherwise, you're just telling the server to serve the pages as UTF-8 (Which it's already defaulting to).

  20. #20
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    Sorry - That was a typo. You should put this in the top of your script:
    PHP Code:
    <?php
    header
    ("Content-Type: text/html; charset=ISO-8859-1");
    ?>
    Otherwise, you're just telling the server to serve the pages as UTF-8 (Which it's already defaulting to).
    doesnt work too..


    Otherwise, you're just telling the server to serve the pages as UTF-8 (Which it's already defaulting to).
    Exactly.. but i dunno how to change it.

  21. #21
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh wait.... it started to work now!!!

    AMAZING!!!! I LOVE YOU!!!!!!


    THANKS!!!!

  22. #22
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome

  23. #23
    Non-Member Lambda's Avatar
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1st i converted all mysql tables into utf8, and then i putted the ISO-8859-1 header function like you said in my .php file. strangely, with a utf8 DB and iso html it works well as you can see on the site:
    http://www.lisbonxtyle.com/

    Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •