I have problem with returning first letter from string, when that letter is language specific character.
Reason of that situation is simple: specific character saved in string takes more than one character, and decoding takes place only on display in html with right coding.
When i try do this on php, smarty (truncate to first character), or even mysql i have only part of that letter coded in UTF (for example: � instead of real language specific character).
Is there any way to do this right?
Thanks
Use the multibyte string functions. For example here you can use mb_substr.
Here I am assuming you are using UTF-8.