I18N_Arabic
[ class tree: I18N_Arabic ] [ index: I18N_Arabic ] [ all elements ]

Class: I18N_Arabic_CharsetC

Source Location: /Arabic/CharsetC.php

Class Overview


This PHP class converts a given Arabic string from one Arabic character set to another


Author(s):

Copyright:

  • 2006-2013 Khaled Al-Sham'aa

Methods



Class Details

[line 93]
This PHP class converts a given Arabic string from one Arabic character set to another



Tags:

author:  Khaled Al-Sham'aa <khaled@ar-php.org>
copyright:  2006-2013 Khaled Al-Sham'aa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Methods


static method singleton [line 147]

static object Instance singleton( )

The singleton method



Tags:

return:  of this class
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


[ Top ]

constructor __construct [line 108]

I18N_Arabic_CharsetC __construct( [array $sets = array('windows-1256', 'utf-8')])

Loads initialize values (this should be private method because of singleton)



Tags:

access:  public


Parameters:

array   $sets   Charsets you would like to support

[ Top ]

method bug2iso [line 611]

string bug2iso( string $string)

Convert buggy Arabic imported database string to ISO-8859-6 format



Tags:

return:  Converted Arabic string in ISO-8859-6 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when export database from MySQL < 4.1 into MySQL >= 4.1 using phpMyAdmin tool where each Arabic UTF-8 character translate as two ISO-8859-1 characters in export, then translate them into UTF-8 format in import.

[ Top ]

method bug2utf [line 572]

string bug2utf( string $string)

Convert buggy Arabic imported database string to UTF-8 format



Tags:

return:  Converted Arabic string in UTF-8 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when export database from MySQL < 4.1 into MySQL >= 4.1 using phpMyAdmin tool where each Arabic UTF-8 character translate as two ISO-8859-1 characters in export, then translate them into UTF-8 format in import.

[ Top ]

method bug2win [line 533]

string bug2win( string $string)

Convert buggy Arabic imported database string to Windows-1256 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when export database from MySQL < 4.1 into MySQL >= 4.1 using phpMyAdmin tool where each Arabic UTF-8 character translate as two ISO-8859-1 characters in export, then translate them into UTF-8 format in import.

[ Top ]

method findISO [line 261]

integer findISO( string $char)

Get extract position of a given ISO-8859-6 character



Tags:

return:  Extract position
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  protected


Parameters:

string   $char   ISO-8859-6 character

[ Top ]

method findUTF [line 203]

integer findUTF( string $char)

Get extract position of a given UTF character



Tags:

return:  Extract position
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  protected


Parameters:

string   $char   UTF character

[ Top ]

method findWIN [line 232]

integer findWIN( string $char)

Get extract position of a given Windows-1256 character



Tags:

return:  Extract position
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  protected


Parameters:

string   $char   Windows-1256 character

[ Top ]

method getHTML [line 177]

string getHTML( integer $index)

Get HTML entity from given position



Tags:

return:  HTML entity
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  protected


Parameters:

integer   $index   Extract position

[ Top ]

method getISO [line 248]

string getISO( integer $index)

Get ISO-8859-6 character from given position



Tags:

return:  ISO-8859-6 character
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  protected


Parameters:

integer   $index   Extract position

[ Top ]

method getUTF [line 190]

string getUTF( integer $index)

Get UTF character from given position



Tags:

return:  UTF character
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  protected


Parameters:

integer   $index   Extract position

[ Top ]

method getWIN [line 219]

string getWIN( integer $index)

Get Windows-1256 character from given position



Tags:

return:  Windows-1256 character
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  protected


Parameters:

integer   $index   Extract position

[ Top ]

method html2iso [line 677]

string html2iso( string $string)

Convert buggy Arabic string as HTML entities to ISO-8859-6 format



Tags:

return:  Converted Arabic string in ISO-8859-6 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when insert Arabic string as HTML entities.

[ Top ]

method html2utf [line 647]

string html2utf( string $string)

Convert buggy Arabic string as HTML entities to UTF-8 format



Tags:

return:  Converted Arabic string in UTF-8 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when insert Arabic string as HTML entities.

[ Top ]

method html2win [line 662]

string html2win( string $string)

Convert buggy Arabic string as HTML entities to Windows-1256 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when insert Arabic string as HTML entities.

[ Top ]

method iso2html [line 351]

string iso2html( string $string)

Convert Arabic string from ISO-8859-6 to HTML entities format



Tags:

return:  Converted Arabic string in HTML entities format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in ISO-8859-6 format

[ Top ]

method iso2utf [line 435]

string iso2utf( string $string)

Convert Arabic string from ISO-8859-6 to UTF-8 format



Tags:

return:  Converted Arabic string in UTF-8 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in ISO-8859-6 format

[ Top ]

method iso2win [line 411]

string iso2win( string $string)

Convert Arabic string from ISO-8859-6 to Windows-1256 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in ISO-8859-6 format

[ Top ]

method utf2html [line 376]

string utf2html( string $string)

Convert Arabic string from UTF-8 to HTML entities format



Tags:

return:  Converted Arabic string in HTML entities format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in UTF-8 format

[ Top ]

method utf2iso [line 494]

string utf2iso( string $string)

Convert Arabic string from UTF-8 to ISO-8859-6 format



Tags:

return:  Converted Arabic string in ISO-8859-6 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in UTF-8 format

[ Top ]

method utf2win [line 459]

string utf2win( string $string)

Convert Arabic string from UTF-8 to Windows-1256 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in UTF-8 format

[ Top ]

method win2html [line 326]

string win2html( string $string)

Convert Arabic string from Windows-1256 to HTML entities format



Tags:

return:  Converted Arabic string in HTML entities format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in Windows-1256 format

[ Top ]

method win2iso [line 277]

string win2iso( string $string)

Convert Arabic string from Windows-1256 to ISO-8859-6 format



Tags:

return:  Converted Arabic string in ISO-8859-6 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in Windows-1256 format

[ Top ]

method win2utf [line 301]

string win2utf( string $string)

Convert Arabic string from Windows-1256 to UTF-8 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $string   Original Arabic string in Windows-1256 format

[ Top ]


Documentation generated on Mon, 14 Jan 2013 17:48:40 +0100 by phpDocumentor 1.4.0