in reply to writing UTF-8 files

Valid ASCII is valid UTF-8. Your receiving party is mistaken.

Updated: They are probably actually seeing that your file does not have a Byte Order Mark(BOM). This mark is neither required nor recommended, but is allowed and many Windows programs add one. If you cannot convince them to understand the UTF-8 standard, you may want to look at File::BOM:

open(FH, '>:encoding(UTF-8):via(File::BOM):utf8', $filename)

April 1 Update: see also UTF-9


The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. -- Cyrus H. Gordon

Replies are listed 'Best First'.
Re^2: writing UTF-8 files
by Joost (Canon) on Mar 31, 2005 at 22:24 UTC
Re^2: writing UTF-8 files
by orionblue3 (Initiate) on Apr 01, 2005 at 14:54 UTC
    Thanks, guys, for clearing that up. I ended up going with File::BOM just to appease the guy receiving my file. I definately appreciate the explanation of the underlying concepts too, since this is the first time I've had to deal with encoding. Thanks!