In Bosnia we have following characters only used in latin-form in Bosnia and Croatia, so I'd need to convert these letters as following:
FROM | TO
ć | c
č | c
ž | z
š | s
đ | dj
If this is possible with some special form of RegEx, or utf8_encode/decode, that informatiion and an appopriate example will be quite welcome! Thanks all.
PS - Want to achive this in PHP!
You can try this:
Also, check out str_replace
You can use this with iconv.
That will work assuming your input
$text
is in utf-8. If it's in latin-1 then useOf cause your PHP must have
iconv
extension, most ofteniconv
is enabled inphp.ini
file, but not always.