I noticed that mb_convert_encoding
always returns valid utf-8, which is great for cleaning up user input, but I wonder whether it will return a normalized form of utf-8 or whether I would have to do that manually after with the \Normalizer
class?
Asked
Active
Viewed 390 times
3

bishop
- 37,830
- 11
- 104
- 139
-
See also [what is normalized UTF-8 all about](http://stackoverflow.com/questions/7931204/what-is-normalized-utf-8-all-about)? – bishop Jun 22 '16 at 23:39
1 Answers
3
Reading the source, mb_convert_encoding
does not appear to normalize. It appears to convert between encodings then to substitute illegal characters, and that is all.

bishop
- 37,830
- 11
- 104
- 139
-
Thanks, that's a good idea to look at the source although I probably wouldn't have felt confident in decrypting it... – Jun 21 '16 at 19:23