New function "isUTF8" added.

Original method came from: http://git.io/ku5LaQ