I am not sure why his is done (the original file contains text strings that are in cyrillic, but the system (and hopefully DartEditor) use UTF).
Other compilers (like Closure or TypeScript) leave it as it is.
I am wondering if someone can explain:
- Why it is done in this way
- What is the significance of this
- Is there a way to turn this off
When dart2js reads a string it decodes that string. For example if your string contained a \n it decodes it into a new line character. When dart2js writes the string out, it does needs to encode the strings again. For simplicity dart2js simply encodes everything that is not ASCII.
Please file a bug report, and we will have a look to see if it’s easy to fix.
Answered By – Florian Loitsch
Answer Checked By – Clifford M. (FlutterFixes Volunteer)