moodlehq / moodle-local_codechecker

A Moodle local plugin providing a simple web UI to run the MoodleCS coding style checks with PHP_CodeSniffer.
63 stars 72 forks source link

Utf8 file encoding #71

Closed stronk7 closed 4 years ago

stronk7 commented 4 years ago

Handle all files as utf-8

While newer versions of phcs already default to utf-8, our one
still defaults to iso-8859-1, leading to wrong chat (byte) counts
when multi-byte chars are used.

With this patch, from the standard definition, all files will
be considered utf-8 encoded.

Covered with unit tests.

This needs to be merged after #70 , as far as it's built on top of it.

Ciao :-)

stronk7 commented 4 years ago

For cross-reference, this is https://tracker.moodle.org/browse/CONTRIB-8024

sarjona commented 4 years ago

Thanks Eloy! The patch looks good and the tests you added are passing :-)