Example 3. php.ini setting for SJIS users
;; Enable Output Buffering
output_buffering = On
;; Set mb_output_handler to enable output conversion
output_handler = mb_output_handler
;; Set HTTP header charset
default_charset = Shift_JIS
;; Set default language to Japanese
mbstring.language = Japanese
;; Set http input encoding conversion to auto
mbstring.http_input = auto
;; Convert to SJIS
mbstring.http_output = SJIS
;; Set internal encoding to EUC-JP
mbstring.internal_encoding = EUC-JP
;; Do not print invalid characters
mbstring.substitute_character = none
Resource Types
This extension has no resource types defined.
Predefined Constants
The constants below are defined by this extension, and will
only be available when the extension has either been compiled
into PHP or dynamically loaded at runtime.
MB_OVERLOAD_MAIL (integer)
MB_OVERLOAD_STRING (integer)
MB_OVERLOAD_REGEX (integer)
HTTP Input and Output
HTTP input/output character encoding conversion may convert
binary data also. Users are supposed to control character
encoding conversion if binary data is used for HTTP input/output.
Note: In PHP 4.3.2 or earlier versions, there was a limitation
in this functionality that mbstring does not perform character
encoding conversion in POST data if the enctype attribute
in the form element is set to multipart/form-data. So you
have to convert the incoming data by yourself in this case
if necessary.
Beginning with PHP 4.3.3, if enctype for HTML form is set
to multipart/form-data and mbstring.encoding_translation
is set to On in php.ini the POST'ed variables and the names
of uploaded files will be converted to the internal character
encoding as well. However, the conversion isn't applied
to the query keys.
HTTP Input
There is no way to control HTTP input character conversion
from PHP script. To disable HTTP input character conversion,
it has to be done in php.ini.