Add back iconv() calls to correctly detect broken input
Performance improvement: Halt on NULL tokens instead of checking hasMoreTokens()