0

is there any preg or str_replace that can help me remove characters from a string that are not supported on sms in phones. Now accented characters are shown as yy in sms.

Ron Davis
  • 346
  • 8
  • 28
  • Accented characters should be supported by SMS. I can send/receive them with my phone. Are you sure you're not sending them with the wrong character encoding? – halfdan May 27 '10 at 07:53
  • If all you want to support is Latin characters (From space (32) to ~ (126)), you can use a regex like `/[^\x{0020}-\x{007E}]/u` – Amarghosh May 27 '10 at 08:43

1 Answers1

3

You probably want to transliterate those chars.

This will convert an accented ñ to a plain n.

Here is useful further reading on Stack Overflow.

Community
  • 1
  • 1
alex
  • 479,566
  • 201
  • 878
  • 984