Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Internet Explorer UTF-8 Problem


msa

Recommended Posts

Posted
H,

 

I have a bilingual shop (shop.fouman.com) Firefox understands and displays my utf-8 characters correctly but IE sets the default encoding as Arabic and messes up some parts of the pages. Where can I enforce IE to use utf-8 as default encoding in all pages?

 

Thanks for your help in advance.

 

Mima

 

 

Hi,

 

I am having the same problem . Firefox understands and displays my utf-8 Greek characters correctly but IE sets the default encoding as Western so the Greek pages do not display correctly.

 

My greeh.php is encoded in utf-8 and it looks likes this:

 

@setlocale(LC_TIME, 'el_GR.UTF8');

define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime()

define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()

define('DATE_FORMAT', 'd/m/Y'); // this is used for date()

define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

////

// Return date in raw format

// $date should be in format mm/dd/yyyy

// raw date is in format YYYYMMDD, or DDMMYYYY

function tep_date_raw($date, $reverse = false) {

if ($reverse) {

return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);

} else {

return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);

}

}

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'EUR');

 

// Global entries for the <html> tag

define('HTML_PARAMS','dir="LTR" lang="el"');

 

// charset for web pages and emails

define('CHARSET', 'UTF8');

 

 

Thanks for your help in advance.

Posted
Hi,

 

I am having the same problem . Firefox understands and displays my utf-8 Greek characters correctly but IE sets the default encoding as Western so the Greek pages do not display correctly.

 

My greeh.php is encoded in utf-8 and it looks likes this:

 

@setlocale(LC_TIME, 'el_GR.UTF8');

define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime()

define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()

define('DATE_FORMAT', 'd/m/Y'); // this is used for date()

define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

////

// Return date in raw format

// $date should be in format mm/dd/yyyy

// raw date is in format YYYYMMDD, or DDMMYYYY

function tep_date_raw($date, $reverse = false) {

if ($reverse) {

return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);

} else {

return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);

}

}

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'EUR');

 

// Global entries for the <html> tag

define('HTML_PARAMS','dir="LTR" lang="el"');

 

// charset for web pages and emails

define('CHARSET', 'UTF8');

 

 

Thanks for your help in advance.

 

 

I managed to solve my problem, as follows.

My original greek.php had the following:

 

@setlocale(LC_TIME, 'el_GR.UTF8');

// Global entries for the <html> tag

define('HTML_PARAMS','dir="LTR" lang="el"');

// charset for web pages and emails

define('CHARSET', 'UTF8');

 

What I did was to replace the UTF8 with UTF-8 as follows:

 

@setlocale(LC_TIME, 'el_GR.UTF-8');

// Global entries for the <html> tag

define('HTML_PARAMS','dir="LTR" lang="el"');

// charset for web pages and emails

define('CHARSET', 'UTF-8');

 

Now Greek display correctly in both IE and Firefox!

  • 2 weeks later...
Posted

Hello Marinos,

 

Excellent feedback. I tried it and it's working fine so far.

I'd like to put a link in my post so that people can find such simple solutions faster. The problem is I don't know how to do that either:(

 

Cheers,

Thanks, Gracias, Merci

Archived

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

×
×
  • Create New...