Seems to be a fairly hit issue, but I\'ve not yet been able to find a solution; perhaps because it comes in so many flavors. Here it is though. I\'m trying to read
The Mozilla's universalchardet is supposed to be the efficient detector out there. juniversalchardet is the java port of it. There is one more port. Read this SO for more information Character Encoding Detection Algorithm