We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 785
    • 2,113 Posts
    In function SmartSubstr are using Multibyte String Functions, but internal character encoding don’t set. Maybe add mb_internal_encoding("UTF-8"); for UTF-8 users?
    - - -
    I see – in MODx using file names “russian-UTF8” (not “russian-utf8”). This is my mistake – rename please file russian-utf8.inc.php to russian-UTF8.inc.php (if in 0.9.6.3 will be used “russian-UTF8”).
      Создание сайтов на MODx, поддержка сайтов, поисковая оптимизация, программирование, копирайтинг
      Статьи о MODx, регулярно новые публикации
      • 5811
      • 1,717 Posts
      In function SmartSubstr are using Multibyte String Functions, but internal character encoding don’t set. Maybe add mb_internal_encoding("UTF-8"); for UTF-8 users?
      You speak of version 1.7.1 ? This code part has been re-designed in version 1.8.0.

      I see – in MODx using file names “russian-UTF8” (not “russian-utf8”). This is my mistake – rename please file russian-utf8.inc.php to russian-UTF8.inc.php (if in 0.9.6.3 will be used “russian-UTF8”).
      In modx0.9.6.2 uf8 languages files are named ".utf8", so you are right the correct russian language file name should be "russian-utf8.inc.php" rather than "russian-UTF8.inc.php". I add an issue about that in JIRA.
        • 785
        • 2,113 Posts
        Quote from: coroico at Oct 01, 2008, 04:08 AM

        You speak of version 1.7.1 ? This code part has been re-designed in version 1.8.0.
        Really looked the old version rolleyes, but the problem is all the same possible. There are many Multibyte String Functions, and if mb_internal_encoding not set to UTF-8 by default at hosting, maybe some problems.
          Создание сайтов на MODx, поддержка сайтов, поисковая оптимизация, программирование, копирайтинг
          Статьи о MODx, регулярно новые публикации
          • 5811
          • 1,717 Posts
          In the setPageCharset function of the version 1.8, we have:
              // Ajax window charset = UTF-8 and should to be coherent with database
              if (isset($this->dbCharset) && isset($this->pageCharset[$this->dbCharset])) {
                // check if the mbstring extension is required and loaded
                if ($this->dbCharset != 'utf8' && !extension_loaded('mbstring')) {
                  $msgErr = "php_mbstring extension required";
                }
                else {
                  $this->pgCharset = $this->pageCharset[$this->dbCharset];
                  $valid = true;
                }
              }


          is this modification acceptable for you ? :
              // Ajax window charset = UTF-8 and should to be coherent with database
              if (isset($this->dbCharset) && isset($this->pageCharset[$this->dbCharset])) {
                // check if the mbstring extension is required and loaded
                if ($this->dbCharset != 'utf8' && !extension_loaded('mbstring')) {
                  $msgErr = "php_mbstring extension required";
                }
                else {
                  mb_internal_encoding("UTF-8");
                  $this->pgCharset = $this->pageCharset[$this->dbCharset];
                  $valid = true;
                }
              }
            • 785
            • 2,113 Posts
            Quote from: coroico at Oct 01, 2008, 06:10 AM

            is this modification acceptable for you ?
            Yes!
              Создание сайтов на MODx, поддержка сайтов, поисковая оптимизация, программирование, копирайтинг
              Статьи о MODx, регулярно новые публикации