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

Class: I18N_Arabic_CharsetD

Source Location: /Arabic/CharsetD.php

Class Overview


This PHP class detect Arabic string character set


Author(s):

Copyright:

  • 2006-2016 Khaled Al-Sham'aa

Methods



Class Details

[line 85]
This PHP class detect Arabic string character set



Tags:

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


[ Top ]


Class Methods


method getCharset [line 142]

String getCharset( String $string)

Find the most possible character set for given Arabic string in unknown format



Tags:

return:  The most possible character set for given Arabic string in unknown format[utf-8|windows-1256|iso-8859-6]
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

String   $string   Arabic string in unknown format

[ Top ]

method guess [line 106]

Array guess( String $string)

Count number of hits for the most frequented letters in Arabic language (Alef, Lam and Yaa), then calculate association ratio with each of possible character set (UTF-8, Windows-1256 and ISO-8859-6)



Tags:

return:  Character set as key and string association ratio as value
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

String   $string   Arabic string in unknown format

[ Top ]


Documentation generated on Fri, 01 Jan 2016 10:25:53 +0200 by phpDocumentor 1.4.0