function initToASCII($charset) {
			// Only process if the case table is not yet loaded:
		if (is_array($this->toASCII[$charset])) {
			return 1;
		}

			// Use cached version if possible
		$cacheFile = t3lib_div::getFileAbsFileName('typo3temp/cs/csascii_' . $charset . '.tbl');
		if ($cacheFile && @is_file($cacheFile)) {
			$this->toASCII[$charset] = unserialize(t3lib_div::getUrl($cacheFile));
			return 2;
		}

			// init UTF-8 conversion for this charset
		if (!$this->initCharset($charset)) {
			return FALSE;
		}

			// UTF-8/ASCII transliteration is used as the base conversion table
		if (!$this->initUnicodeData('ascii')) {
			return FALSE;
		}

		$nochar = chr($this->noCharByteVal);
		foreach ($this->parsedCharsets[$charset]['local'] as $ci => $utf8) {
				// reconvert to charset (don't use chr() of numeric value, might be muli-byte)
			$c = $this->utf8_decode($utf8, $charset);

			if (isset($this->toASCII['utf-8'][$utf8])) {
				$this->toASCII[$charset][$c] = $this->toASCII['utf-8'][$utf8];
			}
		}

		if ($cacheFile) {
			t3lib_div::writeFileToTypo3tempDir($cacheFile, serialize($this->toASCII[$charset]));
		}

		return 3;
	}
function initToASCII($charset) {
			// Only process if the case table is not yet loaded:
		if (is_array($this->toASCII[$charset])) {
			return 1;
		}

			// Use cached version if possible
		$cacheFile = t3lib_div::getFileAbsFileName('typo3temp/cs/csascii_' . $charset . '.tbl');
		if ($cacheFile && @is_file($cacheFile)) {
			$this->toASCII[$charset] = unserialize(t3lib_div::getUrl($cacheFile));
			return 2;
		}

			// init UTF-8 conversion for this charset
		if (!$this->initCharset($charset)) {
			return FALSE;
		}

			// UTF-8/ASCII transliteration is used as the base conversion table
		if (!$this->initUnicodeData('ascii')) {
			return FALSE;
		}

		$nochar = chr($this->noCharByteVal);
		foreach ($this->parsedCharsets[$charset]['local'] as $ci => $utf8) {
				// reconvert to charset (don't use chr() of numeric value, might be muli-byte)
			$c = $this->utf8_decode($utf8, $charset);

			if (isset($this->toASCII['utf-8'][$utf8])) {
				$this->toASCII[$charset][$c] = $this->toASCII['utf-8'][$utf8];
			}
		}

		if ($cacheFile) {
			t3lib_div::writeFileToTypo3tempDir($cacheFile, serialize($this->toASCII[$charset]));
		}

		return 3;
	}
function initToASCII ( $ charset ) { // Only process if the case table is not yet loaded: if ( is_array ( $ this -> toASCII [ $ charset ] ) ) { return 1 ; } // Use cached version if possible $ cacheFile = t3lib_div :: getFileAbsFileName ( 'typo3temp/cs/csascii_' . $ charset . '.tbl' ) ; if ( $ cacheFile && @ is_file ( $ cacheFile ) ) { $ this -> toASCII [ $ charset ] = unserialize ( t3lib_div :: getUrl ( $ cacheFile ) ) ; return 2 ; } // init UTF-8 conversion for this charset if ( ! $ this -> initCharset ( $ charset ) ) { return FALSE ; } // UTF-8/ASCII transliteration is used as the base conversion table if ( ! $ this -> initUnicodeData ( 'ascii' ) ) { return FALSE ; } $ nochar = chr ( $ this -> noCharByteVal ) ; foreach ( $ this -> parsedCharsets [ $ charset ] [ 'local' ] as $ ci => $ utf8 ) { // reconvert to charset (don't use chr() of numeric value, might be muli-byte) $ c = $ this -> utf8_decode ( $ utf8 , $ charset ) ; if ( isset ( $ this -> toASCII [ 'utf-8' ] [ $ utf8 ] ) ) { $ this -> toASCII [ $ charset ] [ $ c ] = $ this -> toASCII [ 'utf-8' ] [ $ utf8 ] ; } } if ( $ cacheFile ) { t3lib_div :: writeFileToTypo3tempDir ( $ cacheFile , serialize ( $ this -> toASCII [ $ charset ] ) ) ; } return 3 ; }
This function initializes the to-ASCII conversion table for a charset other than UTF-8.
This function is automatically called by the ASCII transliteration functions.

@param	string		Charset for which to initialize conversion.
@return	integer		Returns FALSE on error, a TRUE value on success: 1 table already loaded, 2, cached version, 3 table parsed (and cached).
@access private
This function initializes the to - ASCII conversion table for a charset other than UTF - 8 . This function is automatically called by the ASCII transliteration functions .