encoding of java source files

I've sucesfully compiled java source files (*.java files) over a lot of different encodings (ANSI, Unicode, UTF8, etc). My IDE (Eclipse) has Cp1252 as default on WIndows OS. There is an 'official' encoding for source files ?
[241 byte] By [hnemarich] at [2007-9-30 19:53:19]
# 1

Short answer is Unicode -but that's not enough.

From Java Language Specification:

"Except for comments (?.7), identifiers, and the contents of character and string literals (?.10.4, ?.10.5), all input elements (?.5) in a program are formed only from ASCII characters (or Unicode escapes (?.3) which result in ASCII characters). ASCII (ANSI X3.4) is the American Standard Code for Information Interchange. The first 128 characters of the Unicode character encoding are the ASCII characters."

There's more that applies, I'll not quote it, read chapter 3 of JLS for details.

http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html

ChuckBing at 2007-7-7 0:40:34 > top of Java-index,Administration Tools,Sun Connection...
# 2
Also note that some encodings have, or did have, problems. Search for them in the bug database.
jschell at 2007-7-7 0:40:34 > top of Java-index,Administration Tools,Sun Connection...