Improved invisible character tests