Skip to content

Commit

Permalink
Add encoding/fallback options to Vend::File::readfile/writefile.
Browse files Browse the repository at this point in the history
These options were specifically designed to be backwards-compatible
with both legacy interchange (i.e., no special encoding handling
specified) and the existing MV_UTF8 handling, while allowing the
ability to explicitly override either encoding or fallback method in
either case.

The fallback method was chosen to be minimally intrusive while still
allowing the developer to notice when there are issues with the
encoding when chosen.
  • Loading branch information
David Christensen committed Jun 12, 2009
1 parent eadfc0a commit 9d5ef7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Vend/File.pm
Expand Up @@ -243,6 +243,10 @@ sub readfile {
undef $/;
$contents = <READIN>;
close(READIN);
#::logDebug("done reading contents");

# at this point, $contents should be either raw if encoding is
# not specified or PerlUnicode.
}

if (
Expand Down

0 comments on commit 9d5ef7f

Please sign in to comment.