fix condition and add unicode '\u' support