http://qs321.pair.com?node_id=11112597


in reply to Re^5: Lost in encodings
in thread Lost in encodings

Quite right. Those are the default I/O UTF-8 flags. tchrist included some of them in his recommendations on that monster SO post. Included just as an example of what’s correct. If the length is giving bytes instead of length. It’s broken already and that step, or one before it, is the problem. If the OP included an SSCCE, I’d be more helpful. Possibly… :P