Separate a case folding function
Add more tests
Respect ASCII flag