3

I have a little problem. I've build a tagging system and it mostly work. The only problem is that I get error messages if I use special characters.

Like: ä, ö, ü, ß, Ì, é, è,ë and so on....

If I change ä to ae, or Ì to I ..... then it all work.

Now I don't like to write about 20-60 different str_replace commands.. So, does someone knows a solution for that?

thanks for your help

WellNo
  • 649
  • 3
  • 13
  • 36

1 Answers1

0

Have you checked these questions?

Replacing accented characters php

How do I remove accents from characters in a PHP string?

I'm afraid there is no straightforward one-command solution to your question and you will end up with one huge character map. Mostly because different use cases imply different substitutions. Some cases require ä mapped to a because of string sorting, others prefer to have ä mapped to ae because of readability.

Community
  • 1
  • 1
Matey
  • 1,190
  • 5
  • 7
  • Well, that works.. I don't like it, but its okay. But its the same with arabic letters, chinese letters and so on... And I don't really want to insert every letter on the world, I don't want for this problem.. – WellNo Nov 11 '16 at 15:05
  • Look into the solutions using `iconv` but there are not many people who succeeded to make it work consistently :) I don't think the problem of converting chinese characters to latin alphabet even has a straightforward solution. – Matey Nov 11 '16 at 15:10