PHP iconv (): Unknown error (84)

Source: Internet
Author: User
Tags translit

Today, suddenly received a product manager phone, said the text message sent error, send SMS interface has been running for three months is very normal, take it for granted that there is a problem in the provider side, to find the provider, engaged in a long period of the final discovery or own code has a problem.


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/75/97/wKioL1Y9rQzxfPSTAAB1cz837ng442.jpg "title=" capture. PNG "alt=" Wkiol1y9rqzxfpstaab1cz837ng442.jpg "/>

There is no way to dig their own hole to fill ah, check the code to see where there are problems, tracking code hints, is confused ah, check the official documents it,


Iconv
(PHP 4 >= 4.0.5, PHP 5, PHP 7)
iconv-strings are converted as required character encodings
Description
String Iconv (String $in _charset, String $out _charset, String $str)
Encodes the string str from In_charset to Out_charset.


Parameters
In_charset: Enter the character set.
Out_charset: The character set of the output.
If you add a string//translit after Out_charset, the transliteration (transliteration) feature is enabled. This means that when a character cannot be represented by the target character set, it can be approximated by one or more similar characters. If you add a string//ignore, characters that cannot be expressed in the target character set are silently discarded. Otherwise, Str starts truncating from the first invalid character and causes a e_notice.
STR: the string to convert.
Return value: Returns the converted string, or returns FALSE on failure.


In addition to Baidu

Http://www.tonitech.com/822.html

Http://www.aikaiyuan.com/8418.html


You can determine the direction of the problem.

A character cannot be represented by the target character when the Iconv () function is transcoded

The Iconv () function is required for the second parameter of //translit,//ignore two values.


Previous code:

Iconv ("Utf-8", "GBK", $this->content)

After modifying the code:

Iconv ("Utf-8", "Gbk//translit//ignore", $this->content)


Re-submit SMS content


Your SMS reminder content, which was added at 2015-11-07 15:44, was sent to completion in 2015-11-07 15:45 \ '; Successfully sent 2 people, sending failed 0 people.


OK problem solving

This article is from the "Ouyangjun" blog, make sure to keep this source http://ouyangjun.blog.51cto.com/10284323/1710598

PHP iconv (): Unknown error (84)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.