Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32
  1. #21
    Join Date
    Jun 2010
    Posts
    44
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    If I'm converting my site to UTF-8, will I lose all my data stored in my database, or can I import it into my new database? I have a pretty large customer database, and order history and don't want to lose it.

    Also, it sounds like all I need to do is modify the core files as outlined in the PDF, create my new database and install Zen Cart to the new database. Couldn't I then just copy all my old files over the new ones (making sure not to overwrite the core files that i just changed)? Then my site is back to how I had it (templates, plugins, etc...). Then if I could just re-import my old database info, everything would be golden, right? My biggest concern i just not losing my old database info. Any thoughts would be much appreciated.

  2. #22
    Join Date
    Jul 2010
    Posts
    8
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    stevelucky, try convert some test database in the phpmyadmin to UTF-8 and view results. may be these can help you?

  3. #23
    Join Date
    Sep 2010
    Location
    USA
    Posts
    6
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    Hey there folks.
    I am using ZC 1.3.9d and loaded and that Russian pack referred in the forum (Year 2007 reference).
    So I installed - works fine and shows majority of names.
    What happened is when I try to re-write page "title" in "meta...php" in Russian Language folder it shows gibberish in these places
    Code:
    define('TITLE', 'Название');
    .
    And if I copy some Russian line from web pages and paste into - Dreamweaver drops me a warning to convert pages to UTF-8.
    It actually saves the page (file) but after uploading it shows either in these black squares (in the title) or ??? marks if I change in "tpl_header" where sales pitch supposed to go. Another thing is that ZC was installed by my hosting provider and I don't really have an access to the DB from my end.

    It seems to me that these PHP pages has to have UTF coding and after checking "russian.php" I see there
    Code:
     @setlocale(LC_TIME, 'ru.utf8');
    Is that supposed to rule these pages?

    And the "query_factory.php" reads:
    Code:
    if ($this->link) {
          if (@mysql_select_db($zf_database, $this->link)) {
            if (defined('DB_CHARSET') && version_compare(@mysql_get_server_info(), '4.1.0', '>=')) {
              @mysql_query("SET NAMES '" . DB_CHARSET . "'", $this->link);
              if (function_exists('mysql_set_charset')) {
                @mysql_set_charset(DB_CHARSET, $this->link);
              } else {
                @mysql_query("SET CHARACTER SET '" . DB_CHARSET . "'", $this->link);
              }
            }
            $this->db_connected = true;
            return true;
    So, what am I doing wrong or how do I fix it?
    Thanks for any input.

  4. #24
    Join Date
    Sep 2010
    Location
    USA
    Posts
    6
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    Here is some lines from that "russian.php"
    Code:
    // Define the name of your Gift Certificate as Gift Voucher, Gift Certificate, Zen Cart Dollars, etc. here for use through out the shop
      define('TEXT_GV_NAME','Дисконтные карточки');
      define('TEXT_GV_NAMES','Дисконтные карточки');
    Is this is bc I did not install this localization on my PC but copied from server? So maybe thats why Dreamweaver is corking out on me?

  5. #25
    Join Date
    Jul 2010
    Posts
    8
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    Не очень понимаю, в чем здесь дело, наверное, глючат редакторы при сохранении файлов в юникоде.
    Попробуйте более простые чем Dreamveaver текстовые редакторы. Я использую TextPad, но и он иногда глючит при открытии UTF - странно, но помогает повторное открытие файла. )
    Кстати, в файле russian.php есть еще такая строка:
    Code:
    //  define('CHARSET', 'windows-1251');
      define('CHARSET', 'utf-8');
    Try more simple than Dreamvewaver text editor. I use TextPad, but they sometmes have some bugs where UTF files opening. Than help file reopening.
    Alert, than in the russian.php have it on more string about coding:
    Code:
    //  define('CHARSET', 'windows-1251');
      define('CHARSET', 'utf-8');

  6. #26
    Join Date
    Sep 2010
    Location
    USA
    Posts
    6
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    Спасибо за наводку.
    Я вообще-то после лазания по форуму вчера ещё пооткрывал эти файлы с Notepad++, и какие можно было делал в "UTF without BOD", как один парниша подсказал тут кому-то.
    Я вообщё не пойму почему в одном случае там одна кодировка , в другом - иная.
    Сидел до полночи. Ставил 3 одинаковие в 3-х корреспондентских файлах - нифига. Если укажу "windows-1251", то "квадратики" и в титуле и на странице, если оставлу "UTF-8", то именно те файлы, которые пришли с "руссификацией" не читаются и ставятся, как "???".

    Думаю, что DB здесь пока не при чём, поскольку, когда делаю "товар" или "категорию" с "дефолтным" шаблоном, то ставится нормально и читаемо. Но ето с сайта самого, путём управления, без загрузки на ПК.

    Ещё может в чём дело, это то, что я использую шаблон от одного штатника поверх "русификации". Если ставлю "дефолтную", то пока никаких особых проблем не возникало, кроме понимания в установке "видов" товаров, как бы супер-категорий или подразделов, видов. Там по умолчанию (дефолт) стоят 3 подраздела (один "Бесплатнная Пересылка"), и 2 подраздела документов.

    Блин, ну где-то же должен быть файл ответственный за "насильственную" перекодировку. Я уже нарыл спец примочек к PHP на "header", чтобы он "продавливал" на все остальные страницы - нифига.

  7. #27
    Join Date
    Sep 2010
    Location
    USA
    Posts
    6
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    Вдогонку..
    Вот щас открыл "header.php" прямо из пакета, который закачал с "русификацией" в Notepad++ (no Dreamweaver at all).
    Те линии, где по-Русски - уже закодированы (in the Notepad "Format" dot where it says "Encode in ANSI"):
    Code:
    define('HEADER_TITLE_CREATE_ACCOUNT', 'Создать профиль');
      define('HEADER_TITLE_MY_ACCOUNT', 'Мой профиль');
      define('HEADER_TITLE_CART_CONTENTS', 'Корзина');
      define('HEADER_TITLE_CHECKOUT', 'Контроль');
      define('HEADER_TITLE_TOP', 'Верх');
      define('HEADER_TITLE_CATALOG', 'Главная');
      define('HEADER_TITLE_LOGOFF', 'Выход');
      define('HEADER_TITLE_LOGIN', 'Вход');
    Пробую перекодировать (convert) Нотепадом в UTF-8 или UTF-8 without BOM - вот что получается:
    Code:
    define('HEADER_TITLE_CREATE_ACCOUNT', 'Ү襠����켧);
      define('HEADER_TITLE_MY_ACCOUNT', 'ͮ顯��켧);
      define('HEADER_TITLE_CART_CONTENTS', 'ˮ��৩;
      define('HEADER_TITLE_CHECKOUT', 'ˮלּ');
      define('HEADER_TITLE_TOP', '�;
      define('HEADER_TITLE_CATALOG', 'īᣭῧ);
      define('HEADER_TITLE_LOGOFF', 'ы��);
      define('HEADER_TITLE_LOGIN', 'х蠟);


    А может у меня "русификация" ломаная? Или брать Английскую и вручную переводить по-строчно?
    Last edited by AndySolo; 23 Sep 2010 at 02:36 PM. Reason: additional words

  8. #28
    Join Date
    Sep 2010
    Location
    USA
    Posts
    6
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    Во. Теперь если в "russian.php" везде ставлю UTF-8:
    Code:
      @setlocale(LC_TIME, 'ru.utf8');
      define('DATE_FORMAT_SHORT', '%m/%d/%Y');  // this is used for strftime()
      define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // 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
      if (!function_exists('zen_date_raw')) {
        function zen_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', 'USD');
    
    // Global entries for the <html> tag
      define('HTML_PARAMS','dir="ltr" lang="ru"');
    
    // charset for web pages and emails
      define('CHARSET', 'UTF-8');
    
    // footer text in includes/footer.php
      define('FOOTER_TEXT_REQUESTS_SINCE', 'запросы с');
    , хедер (out of "meta... php" показывает правильно, зато вся страница, и то место в титуле, что стояло в оригинале - квадратики.
    Ниччо нипанимаю!

  9. #29
    Join Date
    Jul 2010
    Posts
    8
    Plugin Contributions
    0

    Default Re: Problems with displaying Russian characters and UTF-8

    Quote Originally Posted by andysolo View Post
    Во. Теперь если в "russian.php" везде ставлю utf-8
    если в нотепале или еще где-то открывается с "зюками", то это неправильный редактор.
    надо добиться чтобы открывался по-русски, и пересохранить в utf-8.

  10. #30
    Join Date
    Oct 2010
    Posts
    1
    Plugin Contributions
    0

    link problem Worked! Only if edited thru Store Manager for ZC or directly thru db

    Hey guys.
    I sat for like an hour, and hand copied the original files from the original zen_ru.zip with Notepad, and encoded them in utf8.

    IT WORKED!! =]
    [but only if edited through Store Mаnager for Zen Cart or directly into the database. Control panel works, but store view doesn't =/ ]

    Ok, so first i changed my database to be utf8_general.
    Then i changed the lines 20ish and 60ish in the english language files.
    Then i changed the 'windows' encoding from the russian files, to utf8.
    Then i added the "my_db_charset" (something like that) becuz i'm using 1.3.9 (u can find by searching "encoding utf8 before install")

    And then i tried out the Control Panel, and everything worked, but still in the front view of the site, it showed the dreaded characters.

    But i tried editing the category name in the database, and it worked like a charm!! =]
    Store Manager for Zen Cart also worked!
    Oh my life is complete.

    If you want to see the site, its bethanysmc.org/store. [My church's bookstore]
    Its a fresh install without any content, and since its the weekend, i'll be adding stuff monday. So keep checking if anything.

    And i'll add the zip file with the UTF-8 encoded files of the russian pack. So if u wanna buy me an espresso, pm me or something =]

    Коротче так:
    Я перекодировал все файлы помощью Нотпэд.
    Изменил датабэйс енкодинг на utf8_general.
    Потом зделал изменения в Англиских и Рисских язычных файлах.
    Добавил файл "my_db_charset.php" [или как там он] потомучто моя версия 1.3.9.
    Установил.

    Начал ковыряться по Конрольной Панели, и всё вроди работает. Но на самом сайте, когда увидел, начало кумарить.
    Но потом попробовал через датабэйс, и заработало.
    И когда использовал Store Manager for Zen Cart, тоже заработало.
    УРА!!

    Сайт на котором работал bethanysmc.org/store, наш черковный сайт, и буду добавлять книги на следуйшей неделе, то продолжайте смотреть. [там пока только генеральные вещи.]

    Я остаблю файлы, и если хотите игостить кофем, то спасибо! Отошлите мне PM.

    Идачи =]

    File is here:
    Фаил здесь:
    http:// bethanysmc.org/store/zenRUutf8.zip

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v139h Problems installing 139h with UTF-8 support and cyrillic symbols
    By the.rampage.rado in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 15 Jan 2012, 01:21 AM
  2. Russian Language characters showing as ????? chars
    By Ms_X in forum Addon Language Packs
    Replies: 23
    Last Post: 10 Mar 2011, 01:04 AM
  3. Special characters not displaying correctly in UTF-8
    By Lagrange in forum Addon Language Packs
    Replies: 8
    Last Post: 16 Nov 2009, 07:42 PM
  4. Russian email -> product name as UTF grabage
    By TheGuest in forum Addon Language Packs
    Replies: 0
    Last Post: 10 Aug 2009, 05:27 PM
  5. Search not working with Russian language characters
    By etrader in forum Addon Language Packs
    Replies: 8
    Last Post: 28 Nov 2008, 12:20 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR