You're not using 3 return codes - you're only using one.  If it returns utf8string that's the only thing you return.  You get the same result from calling IsUTF8().  I'd much prefer you improve that known, working code than add yet another method that handles a bunch of cases we don't care about and takes 150 lines to do so.