Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2010
    Posts
    45
    Plugin Contributions
    0

    Default Help Please!!! Database Encoding

    Orig Install: Zen-Cart Version 1.3.8; patched; Admin folder renamed
    Addons: Stock by Attributes Mod version 1.4.9
    Customization: Custom design (slight modification to Blue Highlites theme); All modifications to Zen-Cart done using Custom Overrides as explained in tutorials

    Whenever I entered a particular product or edited it, and gave the following description:

    [FONT=verdana,arial,helvetica,sans-serif]Senator [/FONT]
    [FONT=verdana,arial,helvetica,sans-serif]Tried and true, the Penn Senator has been an icon on the big game fishing scene, even before the original release of that famous shark movie, Jaws®. The Penn Senatorremains the most trusted, most powerful star drag reel on the market. In fact, most of the original Senator® reels are still fishing, even after decades of service. Little wonder that Penn Senators® have caught more IGFA big game world records than all other makes combined; and with five sizes available, there is a Senator® for everything from movie sized sharks, to grouper, cod, and rockfish. [/FONT]


    I always got only:

    [FONT=verdana,arial,helvetica,sans-serif]Senator [/FONT]

    [FONT=verdana,arial,helvetica,sans-serif]Tried and true, the Penn Senator has been an icon on the big game fishing scene, even before the original release of that famous shark movie, Jaws[/FONT]

    No matter what I tried, the result was the same. Suddenly it dawned upon me after many days that the database was was not accepting special characters! I removed all '®' from the text and got it to display my product description completely!

    Now my question is: How do I change database encoding to make it accept all characters without reinstalling Zen-Cart? I am using MySQL version 5.0.87-community and can access this from cPanel provided by my Linux-based host. Please help as I am quite raw to using databases.

    Thanks,
    Ijlal

  2. #2
    Join Date
    Aug 2005
    Posts
    26,503
    Plugin Contributions
    9

    Default Re: Help Please!!! Database Encoding

    Now my question is: How do I change database encoding to make it accept all characters without reinstalling Zen-Cart?
    Do not use special characters

    Use their html or ansi equivalents

    spaces are mne to prevent parsing

    ® = & # 174 ;

    There are many sources for these and this is only one

    http://www.theukwebdesigncompany.com...characters.php
    Zen-Venom Get Bitten
    Get Your Business Found

  3. #3
    Join Date
    Jan 2010
    Posts
    45
    Plugin Contributions
    0

    Default Re: Help Please!!! Database Encoding

    Quote Originally Posted by kobra View Post
    Do not use special characters

    Use their html or ansi equivalents

    spaces are mne to prevent parsing

    ® = & # 174 ;

    There are many sources for these and this is only one

    http://www.theukwebdesigncompany.com...characters.php
    I tried as you advise, but HTMLarea changes the code to the special character and saves it as ®. Even when you toggle to HTML source, it still shows ® and does not display &#174. After I save, I am getting the same problem as before. The text gets cut off from the first instance of ®

    Thanks.

  4. #4
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    192
    Plugin Contributions
    1

    Default Re: Help Please!!! Database Encoding

    You should be able to use ®
    Last edited by llynix; 11 Feb 2010 at 03:33 PM. Reason: trying to get html encoding down

  5. #5
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,102
    Plugin Contributions
    2

    Default Re: Help Please!!! Database Encoding

    You can easily get around this. Instead of inputting the symbol for registered at every mention of a registered name include text like this at the bottom of the description:

    "The names Jaws, Senator and Senators are the registered trade marks of their repective owners."

    Vger

  6. #6
    Join Date
    Jan 2010
    Posts
    45
    Plugin Contributions
    0

    Default Re: Help Please!!! Database Encoding

    Okay I achieved the desired result by changing the editor to text and then replacing the special character with HTML code, but is there a way to change the default encoding of the database? Maybe I did not choose the correct encoding at the time of installation?

    Thanks once again for your help!

  7. #7
    Join Date
    Jan 2010
    Posts
    45
    Plugin Contributions
    0

    Default Re: Help Please!!! Database Encoding

    Ladies and Gents,

    In the present scenario, this isn't a very practical way of solving the problem on hand. Everytime, I make an edit I have to go make changes in the source code, otherwise I end up losing data, even in text editor.

    Is there no way to change default encoding of database?

    Thanks.

  8. #8
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,102
    Plugin Contributions
    2

    Default Re: Help Please!!! Database Encoding

    Okay, if that's the route you want to go down then this is what you have to do:

    1. Download a backup of your database using phpMyAdmin.
    2. Edit all tables to remove references to MyIsam.
    3. Change the page encoding in Zen Cart to utf8 in includes/languages/english.php - specifically change
    define('CHARSET', 'iso-8859-1');
    to
    define('CHARSET', 'utf8');
    4. Open every single page file in Zen Cart (over 1,000) in a Plain Text Editor set for utf8 encoding, and click Save.
    5. Check all those files to make sure there are no odd characters in any of the files now that you have changed the encoding (especially at the start and end of the file).
    6. Drop the contents of the MyIsam database which used iso-8859-1 (Latin 1) encoding and upload the modified database in utf8.
    7. Upload all modified files.
    8. Pray it all works fine.

    If you work 16 hour days then you should probably be finished within one week.

    I personally think this is taking a sledgehammer to crack a nut and that modifying the product descriptions would be a whole lot easier.

    Vger

  9. #9
    Join Date
    Jan 2010
    Posts
    45
    Plugin Contributions
    0

    Default Whew!!!

    Quote Originally Posted by Vger View Post
    Okay, if that's the route you want to go down then this is what you have to do:

    1. Download a backup of your database using phpMyAdmin.
    2. Edit all tables to remove references to MyIsam.
    3. Change the page encoding in Zen Cart to utf8 in includes/languages/english.php - specifically change
    define('CHARSET', 'iso-8859-1');
    to
    define('CHARSET', 'utf8');
    4. Open every single page file in Zen Cart (over 1,000) in a Plain Text Editor set for utf8 encoding, and click Save.
    5. Check all those files to make sure there are no odd characters in any of the files now that you have changed the encoding (especially at the start and end of the file).
    6. Drop the contents of the MyIsam database which used iso-8859-1 (Latin 1) encoding and upload the modified database in utf8.
    7. Upload all modified files.
    8. Pray it all works fine.

    If you work 16 hour days then you should probably be finished within one week.

    I personally think this is taking a sledgehammer to crack a nut and that modifying the product descriptions would be a whole lot easier.

    Vger
    Hey Vger,

    That is really a tough route to take!

    I did a little more research and made a few modifications as suggested at http://www.srw2d.com/content/english...-1-files-utf-8 and guess what? My problem is solved!

    Thanks anyhow for yours and others' suggestions - No offence meant.

    Have a great day!
    Ijlal

  10. #10
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,955
    Plugin Contributions
    3

    Default Re: Help Please!!! Database Encoding

    I could be wrong here, but part of the problem may lie within the HTMLArea editor, which is known to "have a mind of its own" when certain html characters and tags are used.

    FCKEditor may be a better bet, as is TinyMCE

    (I do most of my edits in plain text mode - even if the page is html - so I don't encounter these issues much.)
    Our latest project is Pet Tags.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Encoding Bug
    By ErikAllan in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 27 Oct 2009, 11:54 PM
  2. EasyPopulate encoding problem
    By balihr in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 29 Oct 2008, 10:10 PM
  3. Encoding issiues
    By mish in forum Addon Language Packs
    Replies: 2
    Last Post: 11 Sep 2007, 09:58 AM

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
  •