integratedmodelling / klab

https://docs.integratedmodelling.org/technote
GNU Affero General Public License v3.0
10 stars 5 forks source link

Proposal: Use UTF-8 encoding & LF (Unix) end-of-line #10

Open iperdomo opened 2 years ago

iperdomo commented 2 years ago

Context

The source code is using ASCII encoding with CRLF (windows) end of lines. When looking at diff, you find those characters ^M, e.g.

2022-06-10_970x519

Change

There are changes that require modification in the developer machine.

Some of this IDE settings can be recorded in a Preferences file

iperdomo commented 1 year ago

Other projects (bigger) also propose this 🤓 - https://bugs.openjdk.org/browse/JDK-8301971

This includes basically the following steps:

  • Tell git that the text files are encoded in UTF-8
  • Look through the code base for text files containing non-ASCII characters, and convert them to UTF-8, if they are not already
  • Update tooling used in building to recognize the fact that files are now in UTF-8 and treat them accordingly (basically, updating compiler flags).