diff --git a/reference/iconv/configure.xml b/reference/iconv/configure.xml
index 9d6abe6169..09711e94c2 100644
--- a/reference/iconv/configure.xml
+++ b/reference/iconv/configure.xml
@@ -1,5 +1,5 @@
-
+
&reftitle.install;
@@ -10,11 +10,12 @@
Note to Win32 Users
- In order to enable this module on a Windows environment, you must copy
- iconv-1.3.dll from the DLL folder of the PHP/Win32 binary
- package to the SYSTEM32 folder of your windows machine. (Ex: C:\WINNT\SYSTEM32
- or C:\WINDOWS\SYSTEM32). Starting with PHP 4.2.1 the name changed to
- iconv.dll
+ In order to enable this module on a Windows environment, you need to put
+ a DLL file named iconv.dll or
+ iconv-1.3.dll (prior to 4.2.1)
+ which is bundled with the PHP/Win32 binary package into a directory
+ that is specified by the PATH environment variable
+ or one of the system directories of your windows installation.
diff --git a/reference/iconv/constants.xml b/reference/iconv/constants.xml
index 9f724d78ea..8415f6344a 100644
--- a/reference/iconv/constants.xml
+++ b/reference/iconv/constants.xml
@@ -1,18 +1,18 @@
-
+
&reftitle.constants;
- Since PHP 4.3.0 it is possible to identify at runtime which iconv
- implementation is adopted by this extension.
+ Since PHP 4.3.0 it is possible to identify at
+ runtime which iconv implementation is adopted by this extension.
- iconv constants
+ iconv constants
- constant
- type
- description
+ Name
+ Type
+ Description
@@ -32,10 +32,38 @@
- Writing implementation-dependent scripts with these constants should be
+ Writing implementation-dependent scripts with these constants is strongly
discouraged.
+
+ Since PHP 5.0.0, the following constants are
+ also available:
+
+ iconv constants available since PHP 5.0.0
+
+
+
+ Name
+ Type
+ Description
+
+
+
+
+ ICONV_MIME_DECODE_STRICT
+ integer
+ A bitmask used for iconv_mime_decode
+
+
+ ICONV_MIME_DECODE_CONTINUE_ON_ERROR
+ integer
+ A bitmask used for iconv_mime_decode
+
+
+
+
+
+
iconv_mime_decode
- Decodes a mime header field
+ Decodes a MIME header field
@@ -13,11 +13,76 @@
stringiconv_mime_decodestringencoded_string
+ intmodestringcharset
- &warn.undocumented.func;
+
+ Returns a decoded MIME field on success,
+ or &false; if an error occurs during the decoding.
+
+
+ mode determines the behaviour in the event
+ iconv_mime_decode encounters a malformed
+ MIME header field. You can specify any combination
+ of the following bitmasks.
+
+ Bitmasks acceptable to iconv_mime_decode
+
+
+
+ Value
+ Constant
+ Description
+
+
+
+
+ 1
+ ICONV_MIME_DECODE_STRICT
+
+ If set, the given header is decoded in full conformance with the
+ standards defined in RFC2047.
+ This option is disabled by default because there are a lot of
+ broken mail user agents that don't follow the specification and don't
+ produce correct MIME headers.
+
+
+
+ 2
+ ICONV_MIME_DECODE_CONTINUE_ON_ERROR
+
+ If set, iconv_mime_decode attempts to continue
+ to process the given header even though an error occurs.
+
+
+
+
+
+
+
+
+ The optional charset parameter specifies the
+ character set to represent the result by. If omitted,
+ iconv.internal_charset
+ will be used.
+
+
+
+
+ iconv_mime_decode example
+
+
+]]>
+
+
+
diff --git a/reference/iconv/functions/iconv-mime-encode.xml b/reference/iconv/functions/iconv-mime-encode.xml
index d7dbf0c3af..c2085c5705 100644
--- a/reference/iconv/functions/iconv-mime-encode.xml
+++ b/reference/iconv/functions/iconv-mime-encode.xml
@@ -1,11 +1,11 @@
-
+
iconv_mime_encode
- Composes a mime header field with field_name and field_value in a specified scheme
+ Composes a MIME header field
@@ -14,11 +14,137 @@
stringiconv_mime_encodestringfield_namestringfield_value
- arraypreference
+ arraypreferences
+
+ Composes and returns a string that represents a valid MIME
+ header field, which looks like the following:
+
+
+
+ In the above example, "Subject" is the field name and the portion that
+ begins with "=?ISO-8859-1?..." is the field value.
+
+
+ You can control the behaviour of iconv_mime_encode
+ by specifying an associative array that contains configuration items
+ to the optional third parameter preferences.
+ The items supported by iconv_mime_encode are
+ listed below. Note that item names are treated case-sensitive.
+
+ Configuration items supported by iconv_mime_encode
+
+
+
+ Item
+ Type
+ Description
+ Default value
+ Example
+
+
+
+
+ scheme
+ boolean
+
+ Specifies the method to encode a field value by. The value of
+ this item may be either "B" or "Q", where "B" stands for
+ base64 encoding scheme and "Q" stands for
+ quoted-printable encoding scheme.
+
+ B
+ B
+
+
+ input-charset
+ string
+
+ Specifies the character set in which the first parameter
+ field_name and the second parameter
+ field_value are presented. If not given,
+ iconv_mime_encode assumes those parameters
+ are presented to it in the
+ iconv.internal_charset
+ ini setting.
+
+
+ iconv.internal_charset
+
+ ISO-8859-1
+
+
+ output-charset
+ string
+
+ Specifies the character set to use to compose the
+ MIME header. If not given, the same value as
+ input-charset will be used.
+
+
+ the same value as input-charset
+
+ UTF-8
+
+
+ line-length
+ integer
+
+ Specifies the maximum length of the header lines. The resulting
+ header is "folded" to a set of multiple lines in case
+ the resulting header field would be longer than the value of this
+ parameter, according to
+ RFC2822 - Internet Message Format.
+ If not given, the length will be limited to 76 characters.
+
+ 76
+ 996
+
+
+ line-break-chars
+ string
+
+ Specifies the sequence of characters to append to each line
+ as an end-of-line sign when "folding" is performed on a long header
+ field. If not given, this defaults to "\r\n"
+ (CRLF). Note that
+ this parameter is always treated as an ASCII string regardless
+ of the value of input-charset.
+
+ \r\n
+ \n
+
+
+
+
+
- &warn.undocumented.func;
+
+
+ iconv_mime_encode example:
+
+ "ISO-8859-1",
+ "output-charset" => "UTF-8",
+ "line-length" => 76,
+ "line-break-chars" => "\n"
+);
+$preferences["scheme"] = "Q";
+// This yields "Subject: =?UTF-8?Q?Pr=C3=BCfung_Pr=C3=BCfung?="
+echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
+$preferences["scheme"] = "B";
+// This yields "Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?="
+echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
+?>
+]]>
+
+
+
diff --git a/reference/iconv/functions/iconv-strlen.xml b/reference/iconv/functions/iconv-strlen.xml
index 791c04fa9b..0090f85fd5 100644
--- a/reference/iconv/functions/iconv-strlen.xml
+++ b/reference/iconv/functions/iconv-strlen.xml
@@ -1,5 +1,5 @@
-
+
@@ -19,16 +19,21 @@
Returns the character count of str.
- In contrast to strlen, the return value of
- iconv_strlen is the number of characters that occur
- in the given byte sequence str, which is not
- necessarily the same as the byte length of the string.
+ In contrast to strlen,
+ iconv_strlen counts the occurrences of characters
+ in the given byte sequence str on the basis of
+ the specified character set, the result of which is not necessarily
+ identical to the length of the string in byte.
If charset parameter is omitted,
- str will be assumed to be encoded in
+ str is assumed to be encoded in
iconv.internal_charset.
+
+
+ See also strlen and mb_strlen.
+
diff --git a/reference/iconv/functions/iconv-strpos.xml b/reference/iconv/functions/iconv-strpos.xml
index 823497eef5..89d8700e9f 100644
--- a/reference/iconv/functions/iconv-strpos.xml
+++ b/reference/iconv/functions/iconv-strpos.xml
@@ -1,5 +1,5 @@
-
+
@@ -34,13 +34,27 @@
If haystack or needle is
- not a string, it is converted to an integer and applied as the ordinal
+ not a string, it is converted to a string and applied as the ordinal
value of a character.
- See also strpos and
- iconv_strrpos.
+ In contrast to strpos, the return value of
+ iconv_strpos is the number of characters that
+ appear before the needle, rather than the offset in bytes to the
+ position where the needle has been found. The characters are counted
+ on the basis of the specified character set charset.
+
+
+
+ If charset parameter is omitted,
+ string are assumed to be encoded in
+ iconv.internal_charset.
+
+
+
+ See also strpos, iconv_strrpos,
+ and mb_strpos.
diff --git a/reference/iconv/functions/iconv-strrpos.xml b/reference/iconv/functions/iconv-strrpos.xml
index 638e777ccf..68ad4a8cfd 100644
--- a/reference/iconv/functions/iconv-strrpos.xml
+++ b/reference/iconv/functions/iconv-strrpos.xml
@@ -1,11 +1,11 @@
-
+
iconv_strrpos
- Finds position of last occurrence of needle within part of haystack beginning with offset
+ Finds the last occurrence of a needle within the specified range of haystack.
@@ -16,9 +16,32 @@
stringneedlestringcharset
+
+ Returns the numeric position of the last occurrence of
+ needle in haystack.
+
- &warn.undocumented.func;
+
+ If needle is not found,
+ iconv_strrpos will return &false;.
+
+ &return.falseproblem;
+
+
+ If haystack or needle is
+ not a string, it is converted to a string and applied as the ordinal
+ value of a character.
+
+
+
+ In contrast to strpos, the return value of
+ iconv_strrpos is the number of characters that
+ appear before the needle, rather than the offset in bytes to the
+ position where the needle has been found. The characters are counted
+ on the basis of the specified character set charset.
+
+
diff --git a/reference/iconv/functions/iconv.xml b/reference/iconv/functions/iconv.xml
index 4ef4545f0d..f7106404d6 100644
--- a/reference/iconv/functions/iconv.xml
+++ b/reference/iconv/functions/iconv.xml
@@ -1,5 +1,5 @@
-
+
@@ -15,10 +15,10 @@
stringstr
- It converts the string str encoded in
- in_charset to the string encoded in
- out_charset. It returns the converted
- string or &false;, if it fails.
+ Performs a character set conversion on the string
+ str from in_charset
+ to out_charset. Returns the converted
+ string or &false; on failure.