That trick doesn't work very well for UTF-16 or UTF-32 files.