fixed string util function to handle unicode strings per testing with tweets