Added test with null character. The behaviour seems to be correct.