Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add guidance about FileWriter and InputSource

...

(To be determined - what is the performance of these relative to ordinary a == b.)

Portability and Character Set Encoding

Avoid the java.io.FileWriter class, as it does not allow specifying the file character set encoding, which leads to portability problems with platforms that do not use utf-8 as the default (like MS Windows). Per the javadoc for this class, you should use java.io.OutputStreamWriter (which takes an encoding), and java.io.FileOutputStream.

Whenever dealing with characters/text I/O, one should specify the encoding.

For similar reasons, when using scala's InputSource class, you must call setEncoding explicitly.

Attach the Source Code

Our build system will obtain the source code for libraries when sbt is able to retrieve them. If a library is not sbt-managed the library itself goes in the lib sub-directory, and the source code and documentation go into libsrc.

...