In my below code I am replacing . with a non-breaking space using
$orginal_startString = str_replace('.',' ',$startString);
This works fine in windows and save in database but in linux it’s not woking properl it’s replacing . with special character Â.
If you want space as text not HTML, Use the hex equivalent 0x20.
$orginal_startString = str_replace('.',chr(0x20),$startString);And check this HTML encoding issues – "Â" character showing up instead of " "