Link to home
Start Free TrialLog in
Avatar of hungnguyenthanh
hungnguyenthanh

asked on

How can I know what file's encoding when I read a file use New I/O package???

Hi every body,
When I use NIO (New I/O JDK1.4) to read a file's content.
How can I know exactly file's encoding (example: UTF-8, Cp1252, shift-jis ...) to choose right decoder to decode the file??
Thanks
Best regards.
Hung, Nguyen Thanh.
ASKER CERTIFIED SOLUTION
Avatar of Venci75
Venci75

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hungnguyenthanh
hungnguyenthanh

ASKER

Pls help me. Thanks
???
as I have already mentioned - there is no universal way to determine the file encoding
But how can I recognize between two encoding file, all not unicode encoding, example: between shift-jis and ansi?