What is WordPress file encoding?

UNIX line endings (\n) and UTF-8 are just common code standards. As far as I can see, they are not even mentioned in the Coding Standards. Most (all?) core PHP files are just plain US-ASCII. Try to follow that path to keep your files as compatible as possible.

If you use UTF-8, add a line at the start of a PHP file with an Encoding Cookie or file variable:

<?php # -*- coding: utf-8 -*-

Many editors (Emacs, Vim, Sublime, Scite) will use that to set the proper encoding automatically.

I have also seen:

<?php # -*- coding: utf-8-unix -*-

But I am not sure how compatible it is.