Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Addon Language Packs / Encoding Problem !!

Encoding Problem !!

Locked

Started by processor on 21 Aug 2010, 1:04 AM · Views: 2,096

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
21 Aug 2010, 1:04 AM
#1
processor avatar

processor

New Zenner

Join Date:
Aug 2010
Posts:
7
Plugin Contributions:
0

Encoding Problem !!

hi there,

I'm trying to view my web site in Arabic..

I did the following changes ( Zen Cart 1.3.9) :

  1. in folder : includes/languages/english.php
// charset for web pages and emails
define('CHARSET', 'utf-8'); 
  1. I added a file in folder: includes/extra_configures which contains:
<?
	define('DB_CHARSET', 'utf-8');
?>

the result?

only the informations stored in the database, are viewed in Arabic..

but other Arabic words which I defined in php files are not in Arabic..

so,
I changed:

// charset for web pages and emails
define('CHARSET', 'utf-8'); 

to

// charset for web pages and emails
define('CHARSET', 'windows-1256'); 

the result?

the informations stored in the database, are NOT viewed in Arabic..

but other Arabic words which I defined in php files are IN Arabic !!!

any suggestions?
Thanks .

21 Aug 2010, 1:19 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Encoding Problem !!

The content which you've stored in your PHP files is evidently saved as windows-1256, and so when you change the site to display in utf-8, all that content is invalid.

You need to re-edit all those PHP files that contain your arabic text, and save them again with UTF-8-without-BOM encoding format. Then re-upload them to your server. After that they should display in UTF8 mode fine.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2010, 2:00 AM
#3
processor avatar

processor

New Zenner

Join Date:
Aug 2010
Posts:
7
Plugin Contributions:
0

Re: Encoding Problem !!

Thanks for your reply DrByte,

You need to re-edit all those PHP files that contain your arabic text, and save them again with UTF-8-without-BOM encoding format.
But how can I do this?

at this moment,
I only changed some English words in : includes/languages/english.php into Arabic

like this one:

// categories box text in sideboxes/categories.php
  define('BOX_HEADING_CATEGORIES', 'الاقسام');

by the way,
your reply was so quick :wink:

21 Aug 2010, 2:21 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Encoding Problem !!

You simply need a text editor that is capable of saving in UTF8-without-BOM mode.

I believe Notepad++ (http://notepad-plus.sf.net) will do that.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2010, 2:50 AM
#5
processor avatar

processor

New Zenner

Join Date:
Aug 2010
Posts:
7
Plugin Contributions:
0

Re: Encoding Problem !!


WoOoW !!

you are so great DrByte !!!

I can't believe my EYES !!!!!!!!!!!!!!

Thaaaaaaaaaaaaaaaaaaaaaaanks a lot :hug:

I didn't waste my time registering in this forum :P

I want to give u 43,637 which is ur #posts

:smile:

now I can sleeeeeeep lool

Thanks Dr :cool:

by the way,
u r so confident =)