Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Charset not following instructions


Orge

Recommended Posts

hi everyone!

I'm having a charset problem, my native language shows the special chars as ? in firefox or rectangles in IE, I can't find where to change this, as the languages are all set correctly in the language.php =/

 

the english language is correct, but when i turn it to portuguese the Í or à don't appear...take a look please, www.corfer.com

 

 

 

thanks

Link to comment
Share on other sites

The replaced font with ? simply means that language pack font is not loaded on the computer you are viewing the site on. Someone with a Portuguese keyboard and language setting should have no problem reading those words.

 

 

hi everyone!

I'm having a charset problem, my native language shows the special chars as a? in firefox or rectangles in IE, I can't find where to change this, as the languages are all set correctly in the language.php =/

 

the english language is correct, but when i turn it to portuguese the Í or à don't appear...take a look please, www.corfer.com

 

 

 

thanks

Link to comment
Share on other sites

well, i guess that's a possibility, but the problem is that if I change manually to the desired charset i.e. Firefox via show->coding->ISO-8859-1

the letters appear correclty, and I know the fonts are corrrect because i'm viewing them in the pc i used to create the site.

he problem is that the site or the browser keeps popping to utf8 for no reason, the language.php has the encoding correctly defined.

 

what i'm going to try now is to edit it on dreamweaver and substitute any á ç or others for the codes <bla> <bla>

Link to comment
Share on other sites

well, i guess that's a possibility, but the problem is that if I change manually to the desired charset i.e. Firefox via show->coding->ISO-8859-1

the letters appear correclty, and I know the fonts are corrrect because i'm viewing them in the pc i used to create the site.

he problem is that the site or the browser keeps popping to utf8 for no reason, the language.php has the encoding correctly defined.

IMO there are a number of issues with that site.

 

First the meta tag with the content type is missing (normally right below the <head> tag:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Anyway, I believe the browsers take their cue from the headers the server sends and the server does not give that (besides that I get the same error messages with curl and Safari):

curl -v http://www.corfer.com/
* About to connect() to www.corfer.com port 80
*   Trying 69.72.149.25... * connected
* Connected to www.corfer.com (69.72.149.25) port 80
> GET / HTTP/1.1
User-Agent: curl/7.13.1 (powerpc-apple-darwin8.0) libcurl/7.13.1 OpenSSL/0.9.7l zlib/1.2.3
Host: www.corfer.com
Pragma: no-cache
Accept: */*

< HTTP/1.1 200 OK
< Date: Sun, 12 Aug 2007 12:28:42 GMT
< Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Pragma: no-cache
< X-Powered-By: PHP/4.4.7
< Set-Cookie: osCsid=d8d1bf12ac993e872e14fb102f8f200a; path=/; domain=www.corfer.com
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html
<br />
<b>Warning</b>:  main(includes/languages/.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in <b>/home/corfer/public_html/includes/application_top.php</b> on line <b>288</b><br />
<br />
<b>Warning</b>:  main(includes/languages/.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in <b>/home/corfer/public_html/includes/application_top.php</b> on line <b>288</b><br />
<br />
<b>Fatal error</b>:  main() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/corfer/public_html/includes/application_top.php</b> on line <b>288</b><br />
* Closing connection #0

Link to comment
Share on other sites

hi, I added the <meta> to the file, I had forgot to put it there because i'm using STS, by doing that the problem is resolved in the firefox, but IE or Opera still don't show the special characters....

JanZ how did you get those errors, what program did you use?

Link to comment
Share on other sites

thanks, but I did that and it didn't work.....I don't know what else to do, i just don't understand why firefox get's the encoding correctly but the others don't...i've tried searching trough the entire code for something that refers to utf8 but got nothing....

 

requesting the source code via IE I get this meta tag wich i assume is correct :

 

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

 

but it still assumes UTF8, and it's not just me, my friends get the same problem...

 

i'm completely freaking out as I'm supposed to have this page ready this week! and this encoding problems are killing me...

i'm starting to believe this is way beyond code...

Link to comment
Share on other sites

i'm starting to believe this is way beyond code...

Yes, it is a server issue. Ask the admin of the server if he/she can fix this. Perhaps he/she has Apache configured not to take commands from .htaccess in the websites.

Link to comment
Share on other sites

i understand, but what bugs me the most is the fact that firefox works fine and ie and opera don't...

and just for thinking about it I may assume that the server may be correct...

Link to comment
Share on other sites

well, the hosts declined any responsability on this. what now ? i«m tired of looking trough the languages.php or any other file that contains the word charset or utf-8....

Link to comment
Share on other sites

Have you tried to set your charset in the database?

 

http://dev.mysql.com/doc/refman/5.0/en/charset.html

and this:

http://us.php.net/mysqli_set_charset

 

Or try this:

 

http://www.w3.org/International/questions/qa-headers-charset

 

 

well, the hosts declined any responsability on this. what now ? i«m tired of looking trough the languages.php or any other file that contains the word charset or utf-8....
Link to comment
Share on other sites

well, the hosts declined any responsability on this.

Bull, if you look at what the server is sending, it is still not sending a character set (that could be defined in the Apache settings). If the host doesn't want to do that than he/she should allow you to add .htaccess that adds a default charset. That doesn't seem to work in your case so the host is responsible for your trouble it seems. There is nothing you can do if your host doesn't solve this IMHO.

curl -v http://www.corfer.com/
* About to connect() to www.corfer.com port 80
*   Trying 69.72.149.25... * connected
* Connected to www.corfer.com (69.72.149.25) port 80
> GET / HTTP/1.1
User-Agent: curl/7.13.1 (powerpc-apple-darwin8.0) libcurl/7.13.1 OpenSSL/0.9.7l zlib/1.2.3
Host: www.corfer.com
Pragma: no-cache
Accept: */*

< HTTP/1.1 200 OK
< Date: Sat, 18 Aug 2007 18:01:58 GMT
< Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Pragma: no-cache
< X-Powered-By: PHP/4.4.7
< Set-Cookie: osCsid=1f6de5210dd70f0088409864f77b059a; path=/; domain=www.corfer.com
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="ltr" lang="pt">
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

Link to comment
Share on other sites

  • 1 month later...

Greetings,

 

You'll find that the issue at hand is related to the actual configuration of php on the host. It most likely has a default setting for utf8 which overrides anything that may be embedded in a page header. Once this default is either removed or changed to a character set such as iso-8859-1 it will work at the browser.

 

Hope that helps

 

 

hdokes

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...