ksuralta@gmail.com escribió:
Quote:
I just want to ask if it's possible to use double byte character
strings as the basic realm in the HTTP header.
>
example.
WWW-Authenticate: Basic realm="<dbcs>"
If HTTP headers are allowed contain values in any charset I presume
you'd need to encode them properly following the rules in rfc2047, just
as you do with e-mail MIME headers. PHP has lots of built-in functions
to _decode_ but I'm not sure about which one should be used to encode.
Maybe mb_encode_mimeheader()?
Another issue is whether browsers will be able to decode it. This test
does not work at all in Opera, Firefox or IE 7:
<?php
header('WWW-Authenticate: Basic realm="=?US-ASCII?Q?foo?="');
?>
There's a discussion about the subject in Mozilla's bug tracker:
https://bugzilla.mozilla.org/show_bug.cgi?id=41489
--
--
http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
http://bits.demogracia.com
-- Mi web de humor al baño María:
http://www.demogracia.com
--