in reply to Unicode strangeness

There is a way to make your code work without modifying it. Just set environment variable PERLIO to perlio:

set PERLIO=perlio