Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

eztextcodec.php
Go to the documentation of this file.
1 <?php
22 class eZTextCodec
23 {
24 public $CodepageMapper;
25 public $Codepage;
34 public function __construct( $inputCharsetCode, $outputCharsetCode,
35 $realInputCharsetCode, $realOutputCharsetCode,
36 $inputEncoding, $outputEncoding )
37 {
38 $this->RequestedInputCharsetCode = $inputCharsetCode;
39 $this->RequestedOutputCharsetCode = $outputCharsetCode;
40 $this->InputCharsetCode = $realInputCharsetCode;
41 $this->OutputCharsetCode = $realOutputCharsetCode;
42 $this->InputCharacterEncodingScheme = $inputEncoding;
43 $this->OutputCharacterEncodingScheme = $outputEncoding;
44
45 $useMBStringExtension = true;
46 if ( isset( $GLOBALS['eZTextCodecMBStringExtension'] ) )
47 $useMBStringExtension = $GLOBALS['eZTextCodecMBStringExtension'];
48
49 // NOTE:
50 // The method eZMBStringMapper::hasMBStringExtension() has been copied and inlined here
51 // Any modification must be reflected in the method
52 $hasMBString = ( function_exists( "mb_convert_encoding" ) and
53 function_exists( "mb_substitute_character" ) and
54 function_exists( "mb_strcut" ) and
55 function_exists( "mb_strlen" ) and
56 function_exists( "mb_strpos" ) and
57 function_exists( "mb_strrpos" ) and
58 function_exists( "mb_strwidth" ) and
59 function_exists( "mb_substr" ) );
60
61 $useMBString = ( $useMBStringExtension and
62 eZTextCodec::useMBString() and
63 $hasMBString );
64
65 // Map for conversion functions using encoding functions
66 $encodingConvertMap = array();
67 $encodingConvertInitMap = array();
68 $encodingStrlenMap = array();
69
70 $encodingStrlenMap['unicode'] = 'strlenUnicode';
71 $encodingStrlenMap['utf-8'] = 'strlenUTF8';
72 $encodingStrlenMap['singlebyte'] = 'strlenCodepage';
73 $encodingStrlenMap['doublebyte'] = 'strlenCodepage';
74
75 // Unicode -> other
76 $encodingConvertMap['unicode']['unicode'] = 'convertNone';
77 $encodingConvertMap['unicode']['utf-8'] = 'convertUnicodeToUTF8';
78 $encodingConvertMap['unicode']['singlebyte'] = 'convertUnicodeToCodepage';
79 $encodingConvertMap['unicode']['doublebyte'] = 'convertUnicodeToCodepage';
80
81 $encodingConvertInitMap['unicode']['singlebyte'] = 'initializeOutputCodepage';
82 $encodingConvertInitMap['unicode']['doublebyte'] = 'initializeOutputCodepage';
83
84 // UTF8 -> other
85 $encodingConvertMap['utf-8']['unicode'] = 'convertUTF8ToUnicode';
86 $encodingConvertMap['utf-8']['utf-8'] = 'convertNone';
87 $encodingConvertMap['utf-8']['singlebyte'] = 'convertCodepageRev';
88 $encodingConvertMap['utf-8']['doublebyte'] = 'convertCodepageRev';
89
90 $encodingConvertInitMap['utf-8']['singlebyte'] = 'initializeOutputCodepage';
91 $encodingConvertInitMap['utf-8']['doublebyte'] = 'initializeOutputCodepage';
92
93 // singlebyte -> other
94 $encodingConvertMap['singlebyte']['unicode'] = 'convertCodepageToUnicode';
95 $encodingConvertMap['singlebyte']['utf-8'] = 'convertCodepage';
96 $encodingConvertMap['singlebyte']['singlebyte'] = 'convertCodepageMapper';
97 $encodingConvertMap['singlebyte']['doublebyte'] = 'convertCodepageMapper';
98
99 $encodingConvertInitMap['singlebyte']['unicode'] = 'initializeInputCodepage';
100 $encodingConvertInitMap['singlebyte']['utf-8'] = 'initializeInputCodepage';
101 $encodingConvertInitMap['singlebyte']['singlebyte'] = 'initializeCodepageMapper';
102 $encodingConvertInitMap['singlebyte']['doublebyte'] = 'initializeCodepageMapper';
103
104 // doublebyte -> other
105 $encodingConvertMap['doublebyte']['unicode'] = 'convertCodepageToUnicode';
106 $encodingConvertMap['doublebyte']['utf-8'] = 'convertCodepage';
107 $encodingConvertMap['doublebyte']['singlebyte'] = 'convertCodepageMapper';
108 $encodingConvertMap['doublebyte']['doublebyte'] = 'convertCodepageMapper';
109
110 $encodingConvertInitMap['doublebyte']['unicode'] = 'initializeInputCodepage';
111 $encodingConvertInitMap['doublebyte']['utf-8'] = 'initializeInputCodepage';
112 $encodingConvertInitMap['doublebyte']['singlebyte'] = 'initializeCodepageMapper';
113 $encodingConvertInitMap['doublebyte']['doublebyte'] = 'convertCodepageMapper';
114
115
116 $noneConversionFunction = 'convertNone';
117 $noneStrlenFunction = 'strlenNone';
118 $conversionFunction = null;
119 $strlenFunction = null;
120 $encodingConvertInitFunction = null;
121
122 // NOTE:
123 // The method eZMBStringMapper::charsetList() hash been copied and inlined here
124 // Any modification must be reflected in the method
125 $mbStringCharsets =& $GLOBALS["eZMBCharsetList"];
126 if ( $useMBString and
127 !is_array( $mbStringCharsets ) )
128 {
129 $charsetList = array( "ucs-4", "ucs-4be", "ucs-4le", "ucs-2", "ucs-2be", "ucs-2le", "utf-32", "utf-32be", "utf-32le", "utf-16",
130 "utf-16be", "utf-16le", "utf-8", "utf-7", "ascii", "euc-jp", "sjis", "eucjp-win", "sjis-win", "iso-2022-jp", "jis",
131 "iso-8859-1", "iso-8859-2", "iso-8859-3", "iso-8859-4", "iso-8859-5", "iso-8859-6", "iso-8859-7", "iso-8859-8",
132 "iso-8859-9", "iso-8859-10", "iso-8859-13", "iso-8859-14", "iso-8859-15", "byte2be", "byte2le", "byte4be",
133 "byte4le", "base64", "7bit", "8bit", "utf7-imap" );
134 $mbStringCharsets = array();
135 foreach ( $charsetList as $charset )
136 {
137 $mbStringCharsets[$charset] = $charset;
138 }
139 }
140
141 // Is to true if the charsets are the same and they have singlebyte encoding
142 $isSinglebyteSame = false;
143 $isSame = false;
144
145 // First detect conversion type
146 if ( $this->InputCharsetCode == $this->OutputCharsetCode ) // Direct match, no conversion
147 {
148 $conversionFunction = $noneConversionFunction;
149 $encodingConvertInitFunction = 'initializeInputCodepage';
150 $inpenc = $this->InputCharacterEncodingScheme;
151 if ( $inpenc == 'singlebyte' )
152 {
153 $isSinglebyteSame = true;
154 }
155 $isSame = true;
156 }
157 else if ( $useMBString and
158 isset( $mbStringCharsets[$this->InputCharsetCode] ) and
159 isset( $mbStringCharsets[$this->OutputCharsetCode] ) ) // Use MBString for converting if charsets supported
160 {
161 // NOTE:
162 // The mbstringmapper object is no longer needed since all functionality is inlined
163 // $this->MBStringMapper = eZMBStringMapper::instance( $this->InputCharsetCode,
164 // $this->OutputCharsetCode );
165 $conversionFunction = "convertMBString";
166 $strlenFunction = "strlenMBString";
167 $encodingConvertInitFunction = false;
168 }
169 else // See if we support encoding scheme and codepage
170 {
171 $inpenc = $this->InputCharacterEncodingScheme;
172 $outenc = $this->OutputCharacterEncodingScheme;
173 if ( isset( $encodingConvertMap[$inpenc][$outenc] ) )
174 {
175 $conversionFunction = $encodingConvertMap[$inpenc][$outenc];
176 }
177 }
178
179 if ( $strlenFunction === null )
180 {
181 $inpenc = $this->InputCharacterEncodingScheme;
182 if ( $isSinglebyteSame )
183 {
184 $strlenFunction = 'strlenNone';
185 }
186 else if ( $useMBString and isset( $mbStringCharsets[$this->InputCharsetCode] ) )
187 {
188 $strlenFunction = 'strlenMBString';
189 }
190 else if ( isset( $encodingStrlenMap[$inpenc] ) )
191 {
192 $strlenFunction = $encodingStrlenMap[$inpenc];
193 if ( $inpenc == 'utf-8')
194 {
195 }
196 }
197 }
198
199 if ( !$isSame and
200 $conversionFunction and
201 $strlenFunction )
202 {
203 $this->initializeConversionFunction( $encodingConvertInitMap, $encodingConvertInitFunction );
204 }
205 if ( !$conversionFunction or
206 !$strlenFunction )
207 {
208 eZDebug::writeError( "Cannot create textcodec from characterset " . $this->RequestedInputCharsetCode .
209 " to characterset " . $this->RequestedOutputCharsetCode,
210 "eZTextCodec" );
211 if ( !$conversionFunction )
212 $conversionFunction = $noneConversionFunction;
213 if ( !$strlenFunction )
214 $strlenFunction = $noneStrlenFunction;
215 }
216
217 $this->ConversionFunction = $conversionFunction;
218 $this->StrlenFunction = $strlenFunction;
219 $this->RequireConversion = $conversionFunction != $noneConversionFunction;
220 }
221
222 function initializeConversionFunction( $encodingConvertInitMap, $encodingConvertInitFunction )
223 {
224 $inpenc = $this->InputCharacterEncodingScheme;
225 $outenc = $this->OutputCharacterEncodingScheme;
226 $initFunction = false;
227 if ( $encodingConvertInitFunction !== null )
228 {
229 if ( $encodingConvertInitFunction )
230 {
231 $initFunction = $encodingConvertInitFunction;
232 }
233 }
234 else if ( isset( $encodingConvertInitMap[$inpenc][$outenc] ) )
235 {
236 $initFunction = $encodingConvertInitMap[$inpenc][$outenc];
237 }
238 if ( $initFunction )
239 {
240 $this->$initFunction();
241 }
242 }
243
244 function initializeCodepageMapper()
245 {
246 $this->CodepageMapper = eZCodePageMapper::instance( $this->InputCharsetCode,
247 $this->OutputCharsetCode );
248 }
249
250 function initializeInputCodepage()
251 {
252 $this->Codepage = eZCodePage::instance( $this->InputCharsetCode );
253 }
254
255 function initializeOutputCodepage()
256 {
257 $this->Codepage = eZCodePage::instance( $this->OutputCharsetCode );
258 }
259
260 /*!/
261 \return true if a conversion is required, if false there's no need to call the textcodec functions.
262 */
263 function conversionRequired()
264 {
265 return $this->RequireConversion;
266 }
267
268 function setUseMBString( $use )
269 {
270 $GLOBALS["eZTextCodecUseMBString"] = $use;
271 }
272
273 function useMBString()
274 {
275 $use =& $GLOBALS["eZTextCodecUseMBString"];
276 if ( !isset( $use ) )
277 $use = true;
278 return $use;
279 }
280
281 function requestedInputCharsetCode()
282 {
283 return $this->RequestedInputCharsetCode;
284 }
285
286 function requestedOutputCharsetCode()
287 {
288 return $this->RequestedOutputCharsetCode;
289 }
290
291 function inputCharsetCode()
292 {
293 return $this->InputCharsetCode;
294 }
295
296 function outputCharsetCode()
297 {
298 return $this->OutputCharsetCode;
299 }
300
301 function convertString( $str )
302 {
303 eZDebug::accumulatorStart( 'textcodec_conversion', false, 'String conversion' );
304 //eZDebug::writeDebug( $this->ConversionFunction, 'conversion function' );
305 $conversionFunction = $this->ConversionFunction;
306 $tmp = $this->$conversionFunction( $str );
307 eZDebug::accumulatorStop( 'textcodec_conversion' );
308 return $tmp;
309 }
310
311 function strlen( $str )
312 {
313 $strlenFunction = $this->StrlenFunction;
314 return $this->$strlenFunction( $str );
315 }
316
320 function convertNoneToUnicode( $str )
321 {
322 return array();
323 }
324
325 function convertCodepageToUnicode( $str )
326 {
327 eZDebug::accumulatorStart( 'textcodec_codepage_unicode', false, 'String conversion w/ codepage to Unicode' );
328 $tmp = $this->Codepage->convertStringToUnicode( $str );
329 eZDebug::accumulatorStop( 'textcodec_codepage_unicode' );
330 return $tmp;
331 }
332
333 function convertUTF8ToUnicode( $str )
334 {
335 eZDebug::accumulatorStart( 'textcodec_utf8_unicode', false, 'String conversion w/ UTF-8 to Unicode' );
336 $tmp = eZUTF8Codec::convertStringToUnicode( $str );
337 eZDebug::accumulatorStop( 'textcodec_utf8_unicode' );
338 return $tmp;
339 }
340
341 function convertUnicodeToCodepage( $unicodeValues )
342 {
343 eZDebug::accumulatorStart( 'textcodec_unicode_codepage', false, 'String conversion w/ Unicode to codepage' );
344 $tmp = $this->Codepage->convertUnicodeToString( $unicodeValues );
345 eZDebug::accumulatorStop( 'textcodec_unicode_codepage' );
346 return $tmp;
347 }
348
349 function convertUnicodeToUTF8( $unicodeValues )
350 {
351 eZDebug::accumulatorStart( 'textcodec_unicode_utf8', false, 'String conversion w/ Unicode to UTF8' );
352 $tmp = eZUTF8Codec::convertUnicodeToString( $unicodeValues );
353 eZDebug::accumulatorStop( 'textcodec_unicode_utf8' );
354 return $tmp;
355 }
356
357 function convertNone( $str )
358 {
359 return $str;
360 }
361
362 function convertCodepage( $str )
363 {
364 eZDebug::accumulatorStart( 'textcodec_codepage', false, 'String conversion w/ codepage' );
365 $tmp = $this->Codepage->convertString( $str );
366 eZDebug::accumulatorStop( 'textcodec_codepage' );
367 return $tmp;
368 }
369
370 function convertCodepageRev( $str )
371 {
372 eZDebug::accumulatorStart( 'textcodec_codepage_rev', false, 'String conversion w/ codepage reverse' );
373 $tmp = $this->Codepage->convertStringFromUTF8( $str );
374 eZDebug::accumulatorStop( 'textcodec_codepage_rev' );
375 return $tmp;
376 }
377
378 function convertCodepageMapper( $str )
379 {
380 eZDebug::accumulatorStart( 'textcodec_codepage_mapper', false, 'String conversion w/ codepage mapper' );
381 $tmp = $this->CodepageMapper->convertString( $str );
382 eZDebug::accumulatorStop( 'textcodec_codepage_mapper' );
383 return $tmp;
384 }
385
386 function convertMBString( $str )
387 {
388 eZDebug::accumulatorStart( 'textcodec_mbstring', false, 'String conversion w/ mbstring' );
389 // $tmp = $this->MBStringMapper->convertString( $str );
390 // NOTE:
391 // Uses the mbstring function directly instead of going trough the class
392 $tmp = mb_convert_encoding( $str, $this->OutputCharsetCode, $this->InputCharsetCode );
393 eZDebug::accumulatorStop( 'textcodec_mbstring' );
394 return $tmp;
395 }
396
397 function strlenNone( $str )
398 {
399 return strlen( $str );
400 }
401
402 function strlenUnicode( $unicodeValues )
403 {
404 return count( $unicodeValues );
405 }
406
407 function strlenCodepage( $str )
408 {
409 return $this->Codepage->strlen( $str );
410 }
411
412 function strlenUTF8( $str )
413 {
414 $utf8_codec = eZUTF8Codec::instance();
415 return $utf8_codec->strlen( $str );
416 }
417
418 function strlenCodepageRev( $str )
419 {
420 return $this->Codepage->strlenFromUTF8( $str );
421 }
422
423 function strlenCodepageMapper( $str )
424 {
425 return $this->CodepageMapper->strlen( $str );
426 }
427
428 function strlenMBString( $str )
429 {
430 // return $this->MBStringMapper->strlen( $str );
431 // NOTE:
432 // Uses the mbstring function directly instead of going trough the class
433 return mb_strlen( $str, $this->InputCharsetCode );
434 }
435
446 static function instance( $inputCharsetCode, $outputCharsetCode = false, $alwaysReturn = true )
447 {
448 if ( $inputCharsetCode === false or $outputCharsetCode === false )
449 {
450 if ( isset( $GLOBALS['eZTextCodecInternalCharsetReal'] ) )
451 {
452 $internalCharset = $GLOBALS['eZTextCodecInternalCharsetReal'];
453 }
454 else
455 {
456 $internalCharset = eZTextCodec::internalCharset();
457 }
458 }
459
460 if ( $inputCharsetCode === false )
461 {
462 $realInputCharsetCode = $inputCharsetCode = $internalCharset;
463 }
464 else
465 {
466 $realInputCharsetCode = eZCharsetInfo::realCharsetCode( $inputCharsetCode );
467 }
468
469 if ( $outputCharsetCode === false )
470 {
471 $realOutputCharsetCode = $outputCharsetCode = $internalCharset;
472 }
473 else
474 {
475 $realOutputCharsetCode = eZCharsetInfo::realCharsetCode( $outputCharsetCode );
476 }
477
478 $check =& $GLOBALS["eZTextCodecCharsetCheck"]["$realInputCharsetCode-$realOutputCharsetCode"];
479 if ( !$alwaysReturn and isset( $check ) and !$check )
480 {
481 $check = null;
482 return $check;
483 }
484 if ( isset( $check ) and is_object( $check ) )
485 {
486 return $check;
487 }
488
489 if ( !$realInputCharsetCode )
490 {
491 $realInputCharsetCode = eZCharsetInfo::realCharsetCode( $inputCharsetCode );
492 }
493 if ( !$realOutputCharsetCode )
494 {
495 $realOutputCharsetCode = eZCharsetInfo::realCharsetCode( $outputCharsetCode );
496 }
497 $inputEncoding = eZCharsetInfo::characterEncodingScheme( $realInputCharsetCode, true );
498 $outputEncoding = eZCharsetInfo::characterEncodingScheme( $realOutputCharsetCode, true );
499 if ( !$alwaysReturn and
500 $inputEncoding == 'singlebyte' and
501 $inputEncoding == $outputEncoding and
502 $realInputCharsetCode == $realOutputCharsetCode )
503 {
504 $check = null;
505 return $check;
506 }
507
508 $globalsKey = "eZTextCodec-$realInputCharsetCode-$realOutputCharsetCode";
509 if ( !isset( $GLOBALS[$globalsKey] ) ||
510 !( $GLOBALS[$globalsKey] instanceof eZTextCodec ) )
511 {
512 $GLOBALS[$globalsKey] = new eZTextCodec( $inputCharsetCode, $outputCharsetCode,
513 $realInputCharsetCode, $realOutputCharsetCode,
514 $inputEncoding, $outputEncoding );
515 }
516
517 $check = $GLOBALS[$globalsKey];
518 return $GLOBALS[$globalsKey];
519 }
520
526 static function updateSettings( $settings )
527 {
528 unset( $GLOBALS['eZTextCodecInternalCharsetReal'] );
529 unset( $GLOBALS['eZTextCodecHTTPCharsetReal'] );
530 unset( $GLOBALS['eZTextCodecCharsetCheck'] );
531 $GLOBALS['eZTextCodecInternalCharset'] = $settings['internal-charset'];
532 $GLOBALS['eZTextCodecHTTPCharset'] = $settings['http-charset'];
533 $GLOBALS['eZTextCodecMBStringExtension'] = $settings['mbstring-extension'];
534 if ( function_exists( 'mb_internal_encoding' ) )
535 {
536 @mb_internal_encoding( $settings['internal-charset'] );
537 }
538 }
539
546 static function internalCharset()
547 {
548 $realCharset =& $GLOBALS['eZTextCodecInternalCharsetReal'];
549 if ( !isset( $realCharset ) )
550 {
551 if ( !isset( $GLOBALS['eZTextCodecInternalCharset'] ) )
552 {
553 $i18n = eZINI::instance( 'i18n.ini', '', false );
554 $charsetCode = $i18n->variable( 'CharacterSettings', 'Charset' );
555 }
556 else
557 $charsetCode = $GLOBALS['eZTextCodecInternalCharset'];
558 $realCharset = eZCharsetInfo::realCharsetCode( $charsetCode );
559 }
560 return $realCharset;
561 }
562
568 static function httpCharset()
569 {
570 $realCharset =& $GLOBALS['eZTextCodecHTTPCharsetReal'];
571 if ( !isset( $realCharset ) )
572 {
573 $charset = '';
574 if ( isset( $GLOBALS['eZTextCodecHTTPCharset'] ) )
575 $charset = $GLOBALS['eZTextCodecHTTPCharset'];
576 if ( $charset == '' )
577 {
578 if ( isset( $GLOBALS['eZTextCodecInternalCharsetReal'] ) )
579 $realCharset = $GLOBALS['eZTextCodecInternalCharsetReal'];
580 else
581 $realCharset = eZTextCodec::internalCharset();
582 }
583 else
584 {
585 $realCharset = eZCharsetInfo::realCharsetCode( $charset );
586 }
587 }
588 return $realCharset;
589 }
590
591 public $RequestedInputCharsetCode;
592 public $RequestedOutputCharsetCode;
593 public $InputCharsetCode;
594 public $OutputCharsetCode;
595 public $InputCharacterEncodingScheme;
596 public $OutputCharacterEncodingScheme;
597 public $ConversionFunction;
598 public $StrlenFunction;
599 public $RequireConversion;
600
601
602 }
603
604 ?>
eZCharsetInfo\realCharsetCode
static realCharsetCode( $charsetCode)
Definition: ezcharsetinfo.php:186
eZCharsetInfo\characterEncodingScheme
static characterEncodingScheme( $charsetCode, $isRealCharset=false)
Definition: ezcharsetinfo.php:206
eZCodePageMapper\instance
static instance( $input_charset_code, $output_charset_code, $use_cache=true)
Definition: ezcodepagemapper.php:242
eZCodePage\instance
static instance( $charset_code, $use_cache=true)
Definition: ezcodepage.php:713
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZDebug\accumulatorStart
static accumulatorStart( $key, $inGroup=false, $name=false, $recursive=false)
Definition: ezdebug.php:1361
eZDebug\accumulatorStop
static accumulatorStop( $key, $recursive=false)
Definition: ezdebug.php:1389
eZTextCodec
Handles conversion from one charset to another.
Definition: eztextcodec.php:23
eZTextCodec\convertUTF8ToUnicode
convertUTF8ToUnicode( $str)
Definition: eztextcodec.php:333
eZTextCodec\$RequestedInputCharsetCode
$RequestedInputCharsetCode
Definition: eztextcodec.php:591
eZTextCodec\$StrlenFunction
$StrlenFunction
Definition: eztextcodec.php:598
eZTextCodec\outputCharsetCode
outputCharsetCode()
Definition: eztextcodec.php:296
eZTextCodec\__construct
__construct( $inputCharsetCode, $outputCharsetCode, $realInputCharsetCode, $realOutputCharsetCode, $inputEncoding, $outputEncoding)
Definition: eztextcodec.php:34
eZTextCodec\initializeConversionFunction
initializeConversionFunction( $encodingConvertInitMap, $encodingConvertInitFunction)
Definition: eztextcodec.php:222
eZTextCodec\$CodepageMapper
$CodepageMapper
Definition: eztextcodec.php:24
eZTextCodec\initializeInputCodepage
initializeInputCodepage()
Definition: eztextcodec.php:250
eZTextCodec\internalCharset
static internalCharset()
Definition: eztextcodec.php:546
eZTextCodec\convertCodepageRev
convertCodepageRev( $str)
Definition: eztextcodec.php:370
eZTextCodec\strlenUTF8
strlenUTF8( $str)
Definition: eztextcodec.php:412
eZTextCodec\convertCodepageMapper
convertCodepageMapper( $str)
Definition: eztextcodec.php:378
eZTextCodec\$RequireConversion
$RequireConversion
Definition: eztextcodec.php:599
eZTextCodec\convertUnicodeToCodepage
convertUnicodeToCodepage( $unicodeValues)
Definition: eztextcodec.php:341
eZTextCodec\$RequestedOutputCharsetCode
$RequestedOutputCharsetCode
Definition: eztextcodec.php:592
eZTextCodec\convertCodepageToUnicode
convertCodepageToUnicode( $str)
Definition: eztextcodec.php:325
eZTextCodec\strlenNone
strlenNone( $str)
Definition: eztextcodec.php:397
eZTextCodec\updateSettings
static updateSettings( $settings)
Definition: eztextcodec.php:526
eZTextCodec\conversionRequired
conversionRequired()
Definition: eztextcodec.php:263
eZTextCodec\strlenMBString
strlenMBString( $str)
Definition: eztextcodec.php:428
eZTextCodec\convertNoneToUnicode
convertNoneToUnicode( $str)
Definition: eztextcodec.php:320
eZTextCodec\useMBString
useMBString()
Definition: eztextcodec.php:273
eZTextCodec\convertCodepage
convertCodepage( $str)
Definition: eztextcodec.php:362
eZTextCodec\convertNone
convertNone( $str)
Definition: eztextcodec.php:357
eZTextCodec\$OutputCharsetCode
$OutputCharsetCode
Definition: eztextcodec.php:594
eZTextCodec\strlenCodepageRev
strlenCodepageRev( $str)
Definition: eztextcodec.php:418
eZTextCodec\convertString
convertString( $str)
Definition: eztextcodec.php:301
eZTextCodec\initializeCodepageMapper
initializeCodepageMapper()
Definition: eztextcodec.php:244
eZTextCodec\strlen
strlen( $str)
Definition: eztextcodec.php:311
eZTextCodec\$Codepage
$Codepage
Definition: eztextcodec.php:25
eZTextCodec\$OutputCharacterEncodingScheme
$OutputCharacterEncodingScheme
Definition: eztextcodec.php:596
eZTextCodec\inputCharsetCode
inputCharsetCode()
Definition: eztextcodec.php:291
eZTextCodec\convertMBString
convertMBString( $str)
Definition: eztextcodec.php:386
eZTextCodec\setUseMBString
setUseMBString( $use)
Definition: eztextcodec.php:268
eZTextCodec\strlenUnicode
strlenUnicode( $unicodeValues)
Definition: eztextcodec.php:402
eZTextCodec\initializeOutputCodepage
initializeOutputCodepage()
Definition: eztextcodec.php:255
eZTextCodec\strlenCodepage
strlenCodepage( $str)
Definition: eztextcodec.php:407
eZTextCodec\requestedOutputCharsetCode
requestedOutputCharsetCode()
Definition: eztextcodec.php:286
eZTextCodec\$ConversionFunction
$ConversionFunction
Definition: eztextcodec.php:597
eZTextCodec\requestedInputCharsetCode
requestedInputCharsetCode()
Definition: eztextcodec.php:281
eZTextCodec\instance
static instance( $inputCharsetCode, $outputCharsetCode=false, $alwaysReturn=true)
Definition: eztextcodec.php:446
eZTextCodec\$InputCharsetCode
$InputCharsetCode
Definition: eztextcodec.php:593
eZTextCodec\convertUnicodeToUTF8
convertUnicodeToUTF8( $unicodeValues)
Definition: eztextcodec.php:349
eZTextCodec\httpCharset
static httpCharset()
Definition: eztextcodec.php:568
eZTextCodec\strlenCodepageMapper
strlenCodepageMapper( $str)
Definition: eztextcodec.php:423
eZTextCodec\$InputCharacterEncodingScheme
$InputCharacterEncodingScheme
Definition: eztextcodec.php:595
eZUTF8Codec\convertStringToUnicode
static convertStringToUnicode( $str)
Definition: ezutf8codec.php:26
eZUTF8Codec\convertUnicodeToString
static convertUnicodeToString( $unicodeValues)
Definition: ezutf8codec.php:44
eZUTF8Codec\instance
static instance()
Definition: ezutf8codec.php:239
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.