This commit also includes a change to tests/file/stream_rfc2397_002.phpt which doesn't entirely pass in unicode mode yet, however that's a unicode issue in the data:// wrapper that needs fixing, not a problem with the streams layer itself.