Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Why garbage is default


wjwlpp

Recommended Posts

I had used the Chinese packages to add language of Chinese in my osC. The adding process is smooth.

But when I chose "Chinese", all the characters become garbage characters.

I was using IE. So I checked the View --> Code. It was ISO.

When I made it GB2312, all the characters became valid Chinese words, which I wanted.

 

The problem is when I refreshed the pages, all the Chinese characters re-became

garbage AGAIN !. :'(

 

I have no idea why.

 

Anyone can help me ?

 

Thx !!

Link to comment
Share on other sites

I had used the Chinese packages to add language of Chinese in my osC. The adding process is smooth.

But when I chose "Chinese", all the characters become garbage characters.

I was using IE. So I checked the View --> Code. It was ISO.

When I made it GB2312, all the characters became valid Chinese words, which I wanted.

 

The problem is when I refreshed the pages, all the Chinese characters re-became

garbage AGAIN !. :'(

 

I have no idea why.

 

Anyone can help me ?

 

Thx !!

 

I have no experiences with this and maybe a shot in the dark but what is your definition for catalog/includes/languages/chinese.php related to:

// charset for web pages and emails

define('CHARSET', 'iso-8859-1');

 

and

// look in your $PATH_LOCALE/locale directory for available locales..

@setlocale(LC_TIME, 'nl_NL.ISO_8859-1' , 'Dutch');

 

Those two are for my Dutch language part of the site but I assume if you set those correctly for the Chinese language in your chinese.php it should work correctly.

When you refresh the site it will reload the language file and reset your correction made within IE so the adjustment needs to be through osC.

 

HTH

Link to comment
Share on other sites

I think my charset is ok:

define('CHARSET', 'gb2312');

 

Yet, scale is set as

@setlocale(LC_TIME, 'en');

I think maybe this is the reason.

I cannot make the modification now.

I will tell you the result tomorrow.

 

 

 

I have no experiences with this and maybe a shot in the dark but what is your definition for catalog/includes/languages/chinese.php related to:

// charset for web pages and emails

define('CHARSET', 'iso-8859-1');

 

and

// look in your $PATH_LOCALE/locale directory for available locales..

@setlocale(LC_TIME, 'nl_NL.ISO_8859-1' , 'Dutch');

 

Those two are for my Dutch language part of the site but I assume if you set those correctly for the Chinese language in your chinese.php it should work correctly.

When you refresh the site it will reload the language file and reset your correction made within IE so the adjustment needs to be through osC.

 

HTH

Link to comment
Share on other sites

I think my charset is ok:

define('CHARSET', 'gb2312');

 

Yet, scale is set as

@setlocale(LC_TIME, 'en');

I think maybe this is the reason.

I cannot make the modification now.

I will tell you the result tomorrow.

 

 

I have this for traditional chinese:

 

// Global entries for the <html> tag

define('HTML_PARAMS','dir="LTR" lang="zh-tw"');

 

// charset for web pages and emails

define('CHARSET', 'BIG5');

Treasurer MFC

Link to comment
Share on other sites

It failed.

The problem is still there.

In fact, I realized that below line is not the issue reason:

@setlocale(LC_TIME, 'en');

I think it just tell the time format.

:(

 

Head of my chinese.php is like below:

/*

$Id: tchinese.php,v 1.1.1.1 2002/11/07 03:16:47 nickle Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2002 osCommerce

Released under the GNU General Public License

 

*/

 

// look in your $PATH_LOCALE/locale directory for available locales..

// on RedHat try 'en_US'

// on FreeBSD try 'en_US.ISO_8859-1'

// on Windows try 'en', or 'English'

@setlocale(LC_TIME, 'en');

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

define('DATE_FORMAT_LONG', '%Y年%m月%d日'); // this is used for strftime()

define('DATE_FORMAT', 'm/d/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, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);

} else {

return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 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', 'RMB');

 

// Global entries for the <html> tag

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

 

// charset for web pages and emails

define('CHARSET', 'gb2312');

 

// page title

define('TITLE', STORE_NAME);

 

....

 

I have no experiences with this and maybe a shot in the dark but what is your definition for catalog/includes/languages/chinese.php related to:

// charset for web pages and emails

define('CHARSET', 'iso-8859-1');

 

and

// look in your $PATH_LOCALE/locale directory for available locales..

@setlocale(LC_TIME, 'nl_NL.ISO_8859-1' , 'Dutch');

 

Those two are for my Dutch language part of the site but I assume if you set those correctly for the Chinese language in your chinese.php it should work correctly.

When you refresh the site it will reload the language file and reset your correction made within IE so the adjustment needs to be through osC.

 

HTH

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...