Re: [PEPr] +1 for Web Services::Service_Amazon_S3

From: Date: Wed, 12 Mar 2008 17:52:16 +0000
Subject: Re: [PEPr] +1 for Web Services::Service_Amazon_S3
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49409@lists.php.net to get a copy of this message
Michael Gauthier wrote:
Is there a reason keys and prefixes are always converted to ISO-8859-1?
PHP5 has poor support for multi-byte character sets like UTF-8, and most built-in functions by default assume that strings are in ISO-8859-1. However, certain functions like those in the DOM extension expose all strings. I could have chosen to use UTF-8 instead of ISO-8859-1. This would make life easier for people whose application is based on UTF-8 and harder for the ISO-8859-1 crowd. If the library supports only one character set, one of these crowds would have to use utf8_encode()/utf8_decode() on all strings. Using UTF-8 makes sense for the DOM extension, because XML data often contains characters that are not part of ISO-8859-1. This is probably less likely for object keys on Amazon. So far I have chosen a simple solution that follows the convention used by the majority of PHP functions. I imagine that a future release would allow programmers to specify explicitly which character set they are using. This can be done in a completely backwards compatible way. I may also be possible to make it work automagically when the mbstring extension is enabled, but I don't have much experience with that. Christian

« previous php.pear.dev (#49409) next »