Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-5238

Avoiding garbled characters of course category name

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.4.5
    • Fix Version/s: 1.6.4
    • Component/s: General
    • Labels:
      None
    • Environment:
      Neutrino
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_14_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE

      Description

      We can avoid garbled characters (non-ASCII) of course category name by adding one code to lib/adodb/drivers/adodb-mysql.inc.php.

      [Environment]

      Linux: CentOS 4.3

      PHP: 4.3.9

      MySQL: 4.1.12

      Moodle:1.5.3+

      Moodle langpack: ja_utf8

      [Modification]

      Script: lib/adodb/drivers/adodb-mysql.inc.php

      Line: 363

      // returns true or false

      function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)

      {

      if (!empty($this->port)) $argHostname .= :.$this->port;

      if (ADODB_PHPVER >= 0x4300)

      $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,

      $this->forceNewConnect,$this->clientFlags);

      else if (ADODB_PHPVER >= 0x4200)

      $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,

      $this->forceNewConnect);

      else

      $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword);

      mysql_query(SET NAMES utf8); // avoiding garbled characters on non-ASCII character

      if ($this->_connectionID === false) return false;

      if ($argDatabasename) return $this->SelectDB($argDatabasename);

      return true;

        Attachments

          Activity

            People

            Assignee:
            lazyfish Yu Zhang
            Reporter:
            mits Mitsuhiro Yoshida
            Tester:
            Nobody Nobody
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              17/Jan/07