From d6e69825f62bcec67013c611f95a7abb947a0f4d Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sat, 3 Feb 2007 05:34:30 +0000 Subject: [PATCH] WS, prepare for new doc style git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@228828 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../iconv/functions/iconv-get-encoding.xml | 99 ++++--- .../functions/iconv-mime-decode-headers.xml | 182 ++++++------ .../iconv/functions/iconv-mime-decode.xml | 160 ++++++----- .../iconv/functions/iconv-mime-encode.xml | 261 +++++++++--------- .../iconv/functions/iconv-set-encoding.xml | 79 +++--- reference/iconv/functions/iconv-strlen.xml | 69 +++-- reference/iconv/functions/iconv-strpos.xml | 105 ++++--- reference/iconv/functions/iconv-strrpos.xml | 87 +++--- reference/iconv/functions/iconv-substr.xml | 133 +++++---- reference/iconv/functions/iconv.xml | 77 +++--- .../iconv/functions/ob-iconv-handler.xml | 77 +++--- 11 files changed, 653 insertions(+), 676 deletions(-) diff --git a/reference/iconv/functions/iconv-get-encoding.xml b/reference/iconv/functions/iconv-get-encoding.xml index dbd7eb1d6b..12b5535931 100644 --- a/reference/iconv/functions/iconv-get-encoding.xml +++ b/reference/iconv/functions/iconv-get-encoding.xml @@ -1,42 +1,41 @@ - - - - - iconv_get_encoding - Retrieve internal configuration variables of iconv extension - - - Description - - mixediconv_get_encoding - stringtype - - - iconv_get_encoding returns the current value - of the internal configuration variable if successful, - or &false; on failure. - + + + + iconv_get_encoding + Retrieve internal configuration variables of iconv extension + + + Description + + mixediconv_get_encoding + stringtype + + + iconv_get_encoding returns the current value + of the internal configuration variable if successful, + or &false; on failure. + - - The value of the optional type can be: - - all - input_encoding - output_encoding - internal_encoding - - + + The value of the optional type can be: + + all + input_encoding + output_encoding + internal_encoding + + - - If type is omitted or set to "all", - iconv_get_encoding returns an array that - stores all these variables. - - - - <function>iconv_get_encoding</function> example - + + If type is omitted or set to "all", + iconv_get_encoding returns an array that + stores all these variables. + + + + <function>iconv_get_encoding</function> example + ]]> - - - The printout of the above program will be: - - + + + The printout of the above program will be: + + - - - - - See also iconv_set_encoding and - ob_iconv_handler. - - - + + + + + See also iconv_set_encoding and + ob_iconv_handler. + + + - - - iconv_mime_decode_headers - - Decodes multiple MIME header fields at once - - - - Description - - arrayiconv_mime_decode_headers - stringencoded_headers - intmode - stringcharset - + + + + iconv_mime_decode_headers + Decodes multiple MIME header fields at once + + + Description + + arrayiconv_mime_decode_headers + stringencoded_headers + intmode + stringcharset + - - Returns an associative array that holds a whole set of - MIME header fields specified by - encoded_headers on success, or &false; - if an error occurs during the decoding. - + + Returns an associative array that holds a whole set of + MIME header fields specified by + encoded_headers on success, or &false; + if an error occurs during the decoding. + - - Each key of the return value represents an individual - field name and the corresponding element represents a field value. - If more than one field of the same name are present, - iconv_mime_decode_headers automatically incorporates - them into a numerically indexed array in the order of occurrence. - + + Each key of the return value represents an individual + field name and the corresponding element represents a field value. + If more than one field of the same name are present, + iconv_mime_decode_headers automatically incorporates + them into a numerically indexed array in the order of occurrence. + - - mode determines the behaviour in the event - iconv_mime_decode_headers encounters a malformed - MIME header field. You can specify any combination - of the following bitmasks. - - Bitmasks acceptable to <function>iconv_mime_decode_headers</function> - - - - 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_headers - attempts to ignore any grammatical errors and continue to process - a given header. - - - - -
-
+ + mode determines the behaviour in the event + iconv_mime_decode_headers encounters a malformed + MIME header field. You can specify any combination + of the following bitmasks. + + Bitmasks acceptable to <function>iconv_mime_decode_headers</function> + + + + 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_headers + attempts to ignore any grammatical errors and continue to process + a given header. + + + + +
+
- - The optional charset parameter specifies the - character set to represent the result by. If omitted, - iconv.internal_charset - will be used. - + + The optional charset parameter specifies the + character set to represent the result by. If omitted, + iconv.internal_charset + will be used. + - - <function>iconv_mime_decode_headers</function> example - + + <function>iconv_mime_decode_headers</function> example + ]]> - - &example.outputs; - + + &example.outputs; + - - + + - - See also iconv_mime_decode, - mb_decode_mimeheader, - imap_mime_header_decode, - imap_base64 - and imap_qprint. - -
-
+ + See also iconv_mime_decode, + mb_decode_mimeheader, + imap_mime_header_decode, + imap_base64 + and imap_qprint. + +
+
- - - - iconv_mime_decode - - Decodes a MIME header field - - - - Description - - stringiconv_mime_decode - stringencoded_header - intmode - stringcharset - + + + + iconv_mime_decode + Decodes a MIME header field + + + Description + + stringiconv_mime_decode + stringencoded_header + intmode + stringcharset + - - Returns a decoded MIME field on success, - or &false; if an error occurs during the decoding. - + + 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 <function>iconv_mime_decode</function> - - - - 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. - - - - -
-
+ + 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 <function>iconv_mime_decode</function> + + + + 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. - - - - <function>iconv_mime_decode</function> example - + + The optional charset parameter specifies the + character set to represent the result by. If omitted, + iconv.internal_charset + will be used. + + + + <function>iconv_mime_decode</function> example + ]]> - - - - See also iconv_mime_decode_headers, - mb_decode_mimeheader, - imap_mime_header_decode, - imap_base64 - and imap_qprint. - -
-
+ + + + + See also iconv_mime_decode_headers, + mb_decode_mimeheader, + imap_mime_header_decode, + imap_base64 + and imap_qprint. + +
+
- - - - iconv_mime_encode - - Composes a MIME header field - - - - Description - - stringiconv_mime_encode - stringfield_name - stringfield_value - arraypreferences - - - Composes and returns a string that represents a valid MIME - header field, which looks like the following: - + + + + iconv_mime_encode + Composes a MIME header field + + + Description + + stringiconv_mime_encode + stringfield_name + stringfield_value + 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 <function>iconv_mime_encode</function> - - - - 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. - - - iconv.internal_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" - (CR LF). Note that - this parameter is always treated as an ASCII string regardless - of the value of input-charset. - - \r\n - \n - - - -
-
- - - <function>iconv_mime_encode</function> example: - +
+ 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 <function>iconv_mime_encode</function> + + + + 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. + + + iconv.internal_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" + (CR LF). Note that + this parameter is always treated as an ASCII string regardless + of the value of input-charset. + + \r\n + \n + + + +
+
+ + + <function>iconv_mime_encode</function> example + ]]> - - - - - See also imap_binary, - mb_encode_mimeheader - and imap_8bit. - -
-
+ + + + + See also imap_binary, + mb_encode_mimeheader + and imap_8bit. + + + - - - - iconv_set_encoding - Set current setting for character encoding conversion - - - Description - - booliconv_set_encoding - stringtype - stringcharset - - - iconv_set_encoding changes the value of the internal - configuration variable specified by type to - charset. &return.success; - - - The value of type can be any one of those: - - input_encoding - output_encoding - internal_encoding - - - - - <function>iconv_set_encoding</function> example: - + + + + iconv_set_encoding + Set current setting for character encoding conversion + + + Description + + booliconv_set_encoding + stringtype + stringcharset + + + iconv_set_encoding changes the value of the internal + configuration variable specified by type to + charset. &return.success; + + + The value of type can be any one of those: + + input_encoding + output_encoding + internal_encoding + + + + + <function>iconv_set_encoding</function> example: + ]]> - - - - - See also iconv_get_encoding and - ob_iconv_handler. - - - + + + + + See also iconv_get_encoding and + ob_iconv_handler. + + + - - - - iconv_strlen - - Returns the character count of string - - - - Description - - inticonv_strlen - stringstr - stringcharset - - - Returns the character count of str. - - - 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 is assumed to be encoded in - iconv.internal_charset. - + + + + iconv_strlen + Returns the character count of string + + + Description + + inticonv_strlen + stringstr + stringcharset + + + Returns the character count of str. + + + 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 is assumed to be encoded in + iconv.internal_charset. + - - See also strlen and mb_strlen. - - - + + See also strlen and mb_strlen. + + + - - - - iconv_strpos - - Finds position of first occurrence of a needle within a haystack - - - - Description - - inticonv_strpos - stringhaystack - stringneedle - intoffset - stringcharset - - - Returns the numeric position of the first occurrence of - needle in haystack. - - - The optional offset parameter specifies - the position from which the search should be performed. - - - If needle is not found, - iconv_strpos will return &false;. - + + + + iconv_strpos + Finds position of first occurrence of a needle within a haystack + + + Description + + inticonv_strpos + stringhaystack + stringneedle + intoffset + stringcharset + + + Returns the numeric position of the first occurrence of + needle in haystack. + + + The optional offset parameter specifies + the position from which the search should be performed. + + + If needle is not found, + iconv_strpos will return &false;. + - &return.falseproblem; + &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. - + + 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_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. - + + 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. - + + If charset parameter is omitted, + string are assumed to be encoded in + iconv.internal_charset. + - - See also strpos, iconv_strrpos - and mb_strpos. - - - + + See also strpos, iconv_strrpos + and mb_strpos. + + + - - - - iconv_strrpos - - Finds the last occurrence of a needle within a haystack - - - - Description - - inticonv_strrpos - stringhaystack - stringneedle - stringcharset - - - Returns the numeric position of the last occurrence of - needle in haystack. - + + + + iconv_strrpos + Finds the last occurrence of a needle within a haystack + + + Description + + inticonv_strrpos + stringhaystack + stringneedle + stringcharset + + + Returns the numeric position of the last occurrence of + needle in haystack. + - - If needle is not found, - iconv_strrpos will return &false;. - + + If needle is not found, + iconv_strrpos will return &false;. + - &return.falseproblem; + &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. - + + 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. - - - - See also strrpos, iconv_strpos - and mb_strrpos. - - - + + 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. + + + + See also strrpos, iconv_strpos + and mb_strrpos. + + + - - - - iconv_substr - - Cut out part of a string - - - - Description - - stringiconv_substr - stringstr - intoffset - intlength - stringcharset - + + + + iconv_substr + Cut out part of a string + + + Description + + stringiconv_substr + stringstr + intoffset + intlength + stringcharset + - - Returns the portion of str specified by - the start and length - parameters. - + + Returns the portion of str specified by + the start and length + parameters. + - - If start is non-negative, - iconv_substr cuts the portion out of - str beginning at start'th - character, counting from zero. - + + If start is non-negative, + iconv_substr cuts the portion out of + str beginning at start'th + character, counting from zero. + - - If start is negative, - iconv_substr cuts out the portion beginning - at the position, start characters - away from the end of str. - + + If start is negative, + iconv_substr cuts out the portion beginning + at the position, start characters + away from the end of str. + - - If length is given and is positive, the return - value will contain at most length characters - of the portion that begins at start - (depending on the length of string). - If str is shorter than start - characters long, &false; will be returned. - + + If length is given and is positive, the return + value will contain at most length characters + of the portion that begins at start + (depending on the length of string). + If str is shorter than start + characters long, &false; will be returned. + - - If negative length is passed, - iconv_substr cuts the portion out of - str from the start'th - character up to the character that is - length characters away from the end of the string. - In case start is also negative, the start position - is calculated beforehand according to the rule explained above. - + + If negative length is passed, + iconv_substr cuts the portion out of + str from the start'th + character up to the character that is + length characters away from the end of the string. + In case start is also negative, the start position + is calculated beforehand according to the rule explained above. + - - Note that offset and length - parameters are always deemed to represent offsets that are - calculated on the basis of the character set determined by - charset, whilst the counterpart - substr always takes these for byte offsets. - If charset is not given, the character set - is determined by the iconv.internal_encoding - ini setting. - + + Note that offset and length + parameters are always deemed to represent offsets that are + calculated on the basis of the character set determined by + charset, whilst the counterpart + substr always takes these for byte offsets. + If charset is not given, the character set + is determined by the iconv.internal_encoding + ini setting. + - - See also substr, mb_substr - and mb_strcut. - - - + + See also substr, mb_substr + and mb_strcut. + + + - - - - iconv - Convert string to requested character encoding - - - Description - - stringiconv - stringin_charset - stringout_charset - stringstr - - - Performs a character set conversion on the string - str from in_charset - to out_charset. Returns the converted - string or &false; on failure. - - If you append the string //TRANSLIT to - out_charset transliteration is activated. This - means that when a character can't be represented in the target charset, - it can be approximated through one or several similarly looking - characters. If you append the string //IGNORE, - characters that cannot be represented in the target charset are silently - discarded. Otherwise, str is cut from the first - illegal character. - - - - <function>iconv</function> example: - + + + + iconv + Convert string to requested character encoding + + + Description + + stringiconv + stringin_charset + stringout_charset + stringstr + + + Performs a character set conversion on the string + str from in_charset + to out_charset. Returns the converted + string or &false; on failure. + + If you append the string //TRANSLIT to + out_charset transliteration is activated. This + means that when a character can't be represented in the target charset, + it can be approximated through one or several similarly looking + characters. If you append the string //IGNORE, + characters that cannot be represented in the target charset are silently + discarded. Otherwise, str is cut from the first + illegal character. + + + + <function>iconv</function> example: + ]]> - - - - - + + + + + - - - - ob_iconv_handler - Convert character encoding as output buffer handler - - - Description - - stringob_iconv_handler - stringcontents - intstatus - - - It converts the string encoded in - internal_encoding to - output_encoding. - - - internal_encoding and - output_encoding should be defined - by iconv_set_encoding or in the - configuration file &php.ini;. - - - - <function>ob_iconv_handler</function> example: - + + + + ob_iconv_handler + Convert character encoding as output buffer handler + + + Description + + stringob_iconv_handler + stringcontents + intstatus + + + It converts the string encoded in + internal_encoding to + output_encoding. + + + internal_encoding and + output_encoding should be defined + by iconv_set_encoding or in the + configuration file &php.ini;. + + + + <function>ob_iconv_handler</function> example: + ]]> - - - - - See also iconv_get_encoding, - iconv_set_encoding and - output-control functions. - - - + + + + + See also iconv_get_encoding, + iconv_set_encoding and + output-control functions. + + +