> Any ideas how to determine an encoding by file content?
At least, for XML files, IDEA should check for the encoding setting, and
honor that if it exists.  If not, try to detect.  Based on the discussion
here, I would suggest:

1. Check for XML encoding attribute.  If present, use that.
2. Check whether the file is in UTF format, according to other messages
here.
3. Try anything you think of that I haven't.
4. If the selected charset in IDEA is not UTF (since we know the file isn't
in UTF anyway), use that.
5. If the selected charset IS UTF, use the system default 8-bit charset.

Does that sound like a reasonable detection scheme?

-Walter Mundt



_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features

Reply via email to