Does the storage encoding of php documents affect the browser? Solution

Source: Internet
Author: User
Does the storage encoding of php documents affect the browser? index of this code. phpPHPcode & lt; html & gt; & lt; title & gt; & lt; metahttp-equiv & quot; content-type & quot; content & quot; texthtml; charsetgb2312 & quot; & gt; & lt; does the storage encoding of title & g php document affect the browser?
The code index. php
PHP code
  <Meta http-equiv = "content-type" content = "text/html; charset = gb2312">
  

In Notepad, the default storage encoding is ANSI, which is normally accessed by computer.

However, garbled characters occur when accessing Chinese via mobile phones. English is normal.

Later I changed the storage code to UTF-8 mobile phones and computers can access the normal

The mobile phone is a browser SAFAR that comes with Sony Ericsson W995.
Is there a function that converts a character into a UTF-8 and then outputs it?

------ Solution --------------------
The file encoding and output must be consistent.

Conversion functions

Iconv ('gbk', 'utf-8', 'Chinese ');
------ Solution --------------------
It has an impact. File encoding is the encoding format of some constants in the file.
------ Solution --------------------
Discussion

So how to convert a batch of files from ANSI to UTF-8?

------ Solution --------------------
Discussion
So how to convert a batch of files from ANSI to UTF-8?

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.