Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

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