Sindhi2Hex

Please note that what you see here is not orignal file. Because web server has changed many things e.g. &hex=arry. original can be retreived by right clicking and viewing the source code. I will post improved downloadable version soon, however if you require a original copy please send a mail to: drbhutto@yahoo.com I will send you a zip file.

—————————————————————————————- 

<?php
/*——————————————————————————————
Sindhi Characters to Hexcode Converter

©Dr. Ashfaq Ahmed Bhutto 2007
drbhutto@yahoo.com

Released under the terms and conditions of the
GNU General Public License (https://gnu.org).

$Revision: 1.0 $
$Date: Friday September 07, 2007 $
$Author: Dr. Ashfaq Ahmed Bhutto $
$MBBS, MBA, MAS, DCPS, MRCGP $
USAGE:
Sindhi characters are not supported in PHP etc thus you need to convert in Hexcode.
Specify the filename containing sindhi characters saved as plain text encoded in UTF-8.
if you want to save out put, specify output filename as plain text file e.g. xyz.txt.
The output is the converted text in Hexcode.
This program is Only PHP 5 Compatible.
——————————————————————————————–*/
///****************************************************************************
///This function will Replace characters from a given sindhi string to hex code
//*****************************************************************************
function convert($string){
$sd = array (‘ً ‘,’۱’,’۲’,’۳’,’۴’,’۵’,’۶’,’۷’,’۸’,’۹’,’۰’,’−’,’ق’,’ص’,’ي’,’ر’,’ت’,’ٿ’,’ع’,’ئ’,’و’,’پ’,’ٺ’,’ڍ’,’ه’,’ا’,’س’,’د’,’ف’,’گ’,’ھ’,’ج’,’ڪ’,’ل’,’؛’,’ز’,’خ’,’چ’,’ط’,’ب’,’ن’,’م’,’،’,’ٰ ‘,’ء’,’ٔ ‘,’٪’,’ٌ ‘,’َ ‘,’ض’,’ڏ’,’ڙ’,’ٽ’,’ث’,’غ’,’۽’,’ہ’,’ُ ‘,’ڃ’,’ڱ’,’ة’,’آ’,’ش’,’ڊ’,’ڦ’,’ڳ’,’ح’,’ڄ’,’ک’,’ڀ’,’ذ’,’ڌ’,’ڇ’,’ظ’,’ٻ’,’ڻ’,’۾’,’َ ‘,’ِ ‘,’؟’
);

$hex = array(‘ً’,’۱’,’۲’,’۳’,’۴’,’۵’,’۶’,’۷’,’۸’,’۹’,’۰’,’ـ’,’ق’,’ص’,’ي’,’ر’,’ت’,’ٿ’,’ع’,’ئ’,’و’,’پ’,’ٺ’,’ڍ’,’ە’,’ا’,’س’,’د’,’ف’,’گ’,’ه’,’ج’,’ڪ’,’ل’,’؛’,’ز’,’خ’,’چ’,’ط’,’ب’,’ن’,’م’,’،’,’ٰ’,’ء’,’ٔ’,’٪’,’ٌ’,’َ’,’ض’,’ڏ’,’ڙ’,’ٽ’,’ث’,’غ’,’۽’,’ە’,’ُ’,’ڃ’,’ڱ’,’ة’,’آ’,’ش’,’ڊ’,’ڦ’,’ڳ’,’ح’,’ڄ’,’ک’,’ڀ’,’ذ’,’ڌ’,’ڇ’,’ظ’,’ٻ’,’ڻ’,’۾’,’َ’,’ِ’,’؟’
);
$output = str_replace($sd, $hex, $string);
return $output;
}
///****************************************************************************
//Function to replace & cahraccter to & , makes it savable to text file
//*****************************************************************************
function change($string){
$one = array(‘&’);
$second = array (‘&’);
$output = str_replace($one, $second, $string);
return $output;
}
//****************************************************************************
//Function to convert a file and save to a specified destination
//****************************************************************************
function save($input_file, $output_file){
$converted_str = convert(file_get_contents($input_file));
$str = change ($converted_str);
file_put_contents($output_file,$str);
echo ”

success

“;

}
//*****************************************************************************
//Function to get only the print of input file
//*****************************************************************************
function print_here($input_file){
$converted_str = convert(file_get_contents($input_file));
echo $converted_str;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
?>

body {
margin: 0px;
padding: 0px;
color : #333;
background-color : #FFF;
font-size : 11px;
font-family : Arial, Helvetica, sans-serif;
}

form {
margin: 0px;
}

.heading{
font-size : 18px;
font-family : Arial, Helvetica, sans-serif;
color : #993333;
}

.text{
font-size : 11px;
font-family : Arial, Helvetica, sans-serif;
font-weight : bold;
}

.text2{
text-align:right;
font-size : 10px;
font-family : Arial, Helvetica, sans-serif;
color : #aaaaaa;
}

.login {
margin-left: auto;
margin-right: auto;
margin-top: 6em;
padding: 15px;
border: 1px solid #cccccc;
width: 650px;
background: #F1F3F5;
}

.form-block {
border: 1px solid #cccccc;
background: #E9ECEF;
padding-top: 15px;
padding-left: 10px;
padding-bottom: 10px;
padding-right: 10px;
}

.login-form {
width: 100%;
text-align:center;
}

input {
border: 1px solid #cccccc;
}

.ctr {
text-align: center;
}

Sindhi characters to Hexcode converter

You can convert sindhi characters to Hex code for use in programming e.g. PHP parsing etc.

To use this utility: Firstly: save a textfile containg sindhi characters. This can be done by using MS Word as Sindhi enabled Editor and saving file in plain text encoded in UTF-8. Secondly: Type a output path e.g. xyz.txt & click submit.

Save to File :
Print Here :

Please send your feed back to : Dr. Ashfaq Ahmed Bhutto

Version 1.0

پنهنجو رايو ڏيو