[ic] ic-utf8 readfile/writefile patch

Stefan Hornburg racke at linuxia.de
Fri Apr 24 11:08:10 UTC 2009

David Christensen wrote:
> Folks,
> I've added a patch to the ic-utf8 tree to support encoding/fallback  
> strategy in Vend::File::readfile and writefile.  This is intended to  
> be completely backwards-compatible with both legacy encodings and the  
> current MV_UTF8 scheme while offering the following benefits:
>   - Explicit override of the encoding of any specific file.  This  
> defaults to nothing (aka raw) when MV_UTF8 is not set, and utf-8 when  
> MV_UTF8 is set.
>   - Sensible default fallback to provide maximum information in the  
> case that invalid encoding/decoding sequences are encountered.   
> (Fallback strategy is how we deal with invalid/incomplete characters.)
>   - Think future modifications to [include] to provide access to  
> encoding and fallback parameters:  [include file="foo/bar/baz"  
> encoding="cp1252"]
> I'd appreciate testing of this patch; in particular, this should help  
> with Racke's issue encountered with legacy encodings on the index page  
> with MV_UTF8 set.

The attached patch is cleaned up and also a no-op if MV_UTF8 is false.
It works (for me at least) and I will commit soonish.


LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rw.patch
Type: text/x-diff
Size: 3322 bytes
Desc: not available
Url : http://www.icdevgroup.org/pipermail/interchange-users/attachments/20090424/4f036a2d/attachment.patch 

More information about the interchange-users mailing list