nus nus - 1 year ago 58
PHP Question

Does mbstring normalize utf-8 strings?

I noticed that

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


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.