How I can keep following characters in my paragraphs and stop them being converted or replaced by ' ' empty one or ? marks. I am trying to save following paragraph: "Nā Tā Tīmoti Kāretū a He Muka i tīmata hei pānui reo Māori anake mā te marea. Pānuihia āna kōrero mō te take i whakaterea te pānui toru tekau tau ki muri."
it's Maori language and I wanted to keep it into my database table without converting them to following. "N T Tmoti Kret a He Muka i tmata hei pnui reo Mori anake m te marea. Pnuihia na krero m te take i whakaterea te pnui�toru tekau tau ki muri."
I am using following code to detect if the paragraph have this type of special maori keywords or not.
$keywords = 'āēīōūĀĒĪŌŪ';
$keywords_array = array('ā','ē','ī','ō','ū','Ā','Ē','Ī','Ō','Ū');
for($i=0;$i<count($keywords_array);$i++) {
if(strpos(str_replace(" ","",$_POST['editor1']), $keywords_array[$i]) !== false) {
$found = true;
}
}
if($found) {
//found one possiblities....keep as it is the paragraph but storing into database like other paragraph:(
$output = $_POST['editor1'];
}
Can anyone tell me how I can stop converting special characters when storing in php mysql database.
Please let me know any solution as now it's quite long that I couldn't find simple solution. thanks