BEWARE the file encoding
This project was created in preparation for asking a question on Stackoverflow (https://stackoverflow.com/q/67950751/3166133)
On a private project I had a unit test that passed on Windows and failed on Linux. I narrowed it down to an issue with encoding U+2019 ’
RIGHT SINGLE QUOTATION MARK.
On Windows, calling System.Text.Encoding.UTF8.GetBytes("’")
resulted in the correct 3 bytes (0xE2, 0x80, 0x99
) but on Linux (tested on Ubuntu) the
result bytes correspond to � (0xEF, 0xBF, 0xBD
).
The .cs file where my code had the ’
was ANSI (Windows-1252) encoded.
Convert my ANSI (Windows-1252) encoded files to