A function that tries its best to recover lost Latin Unicode characters, based on the UTF-8 Encoding Debugging Chart
Also takes the opportunity to normalize the passed string, replacing any combined group of characters by their corresponding glyph.
$ npm install fix-utf8
import fixUtf8 from 'fix-utf8'
fixUtf8("L'avenir des idées")
// => "L'avenir des idées"
- forceutf8 (PHP)