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

Class: ArCharsetD

Source Location: /sub/ArCharsetD.class.php

Class Overview


This PHP class will return Arabic character set that used for a given Arabic string passing into this class, those available character sets that can be detected by this class includes the most popular three: Windows-1256, ISO 8859-6, and UTF-8.


Author(s):

Copyright:

  • Khaled Al-Shamaa 2008

Methods



Class Details

[line 43]
This PHP class will return Arabic character set that used for a given Arabic string passing into this class, those available character sets that can be detected by this class includes the most popular three: Windows-1256, ISO 8859-6, and UTF-8.



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  Khaled Al-Shamaa 2008
link:  http://www.ar-php.com


[ Top ]


Class Methods


method getCharset [line 86]

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-Shamaa <khaled.alshamaa@gmail.com>


Parameters:

String   $string   Arabic string in unknown format

[ Top ]

method guess [line 54]

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-Shamaa <khaled.alshamaa@gmail.com>


Parameters:

String   $string   Arabic string in unknown format

[ Top ]


Documentation generated on Thu, 21 Feb 2008 13:58:53 +0200 by phpDocumentor 1.4.0