search
HomeWeb Front-endHTML TutorialAhhhh, what should I do? _html/css_WEB-ITnose

This post was last edited by Gu_D_Axce on 2013-11-22 05:59:36

The pages made by others can use utf-8 to display Chinese characters
But I can only display them using utf-8 Garbled characters, Chinese can only be displayed normally using utf-8
Why is this? How to use utf-8 to display Chinese normally
I am a newbie, please explain carefully~

Reply to the discussion (solution)

In the

In addition, encoding is required Unification, files, meta, headers, databases and methods of connecting to the database must be unified in coding.



The method on the first floor is ok, this method is also ok, the html5 method, it conforms to the verification,,,, and then there is The encoding should be unified

The encoding should be unified

Try adding this before the

tag on the page: <br> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <br> <br> <meta charset="utf-8"> <br> <br> The method on the first floor is OK, and this method is also Yes, the html5 method conforms to the verification,,,, and the encoding must be unified <br> Neither of these two methods will work <p class="sougouAnswer"> <br> Add this test before the </p> <title> tag on the page Try: <br> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <br> <br> <meta charset="utf-8"> <br> The method on the first floor is ok, this method is also ok, the html5 method is in line with the verification,,,, and the encoding must be unified <br> Neither of these two methods will work <br> Unify the encoding ,, css html to see if they are the same <br> Then there is the issue of editor settings. What editor do you use? <p class="sougouAnswer"> Then there is the issue of editor settings. What editor do you use? <br> It doesn’t work when using vim, just switch to notepad. <br> Is there a setting problem? </p> <p class="sougouAnswer"> I have never used vim.. </p> <p class="sougouAnswer"> <br> Then there is the issue of editor settings. What editor do you use? <br> It doesn’t work when using vim, just switch to notepad. <br> Is there a setting problem? <br> Never used it </p> <p class="sougouAnswer"> It doesn’t work when using vim, just switch to notepad. <br> Is there a setting problem? <br> Notepad is used in a Windows environment and already supports Chinese; but vim is under Linux. Maybe there is no Chinese language pack on Linux, or it may be a problem with the language setting of Linux. </p> <p class="sougouAnswer"> <br> It doesn’t work when using vim, just switch to notepad. <br> Is there a setting problem? <br> Notepad is used in a Windows environment and already supports Chinese; but vim is under Linux. Maybe there is no Chinese language pack on Linux, or it may be a problem with the language setting of Linux. <br> Using vim does not work under Linux or Windows </p> <p class="sougouAnswer"> The language settings of the editor, the language settings of html, and the language settings of the background database. . . </p> <p class="sougouAnswer"> Using vim does not work under Linux or Windows <br> Vim is an editor under Linux. How come it is under Windows? It should be Linux connected through a Shell client under Windows. The problem is still On Linux. Under Windows, it is enough to edit through notepad without garbled characters. If it is not the situation I mentioned, please attach a picture to take a look. </p> <p class="sougouAnswer"> <br> Vim does not work under both Linux and Windows <br> Vim is an editor under Linux. How come it is under Windows? It should be Linux connected through a Shell client under Windows. , the problem is still on Linux. Under Windows, it is enough to edit through notepad without garbled characters. If it is not the situation I mentioned, please attach a picture to take a look. <br> Windows has gvim, which is the same. </p> <p class="sougouAnswer"> gvim should be under the F:cygwinbin directory. Is cygwin installed on your computer? </p> <p class="sougouAnswer"> The encoding standard is utf-8 </p> <p class="sougouAnswer"> I've been in your situation before, it's very simple, just change charset=utf-8 before saving the page, or GBK, both will work, but I recommend you to use GBK! </p> <p class="sougouAnswer"> The problem has been solved. It was an issue with the encoding settings of the editor. Thank you everyone </p>
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What is the purpose of the <datalist> element?What is the purpose of the <datalist> element?Mar 21, 2025 pm 12:33 PM

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What is the purpose of the <progress> element?What is the purpose of the <progress> element?Mar 21, 2025 pm 12:34 PM

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

How do I use HTML5 form validation attributes to validate user input?How do I use HTML5 form validation attributes to validate user input?Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the purpose of the <iframe> tag? What are the security considerations when using it?What is the purpose of the <iframe> tag? What are the security considerations when using it?Mar 20, 2025 pm 06:05 PM

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

What is the purpose of the <meter> element?What is the purpose of the <meter> element?Mar 21, 2025 pm 12:35 PM

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

What is the viewport meta tag? Why is it important for responsive design?What is the viewport meta tag? Why is it important for responsive design?Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What are the best practices for cross-browser compatibility in HTML5?What are the best practices for cross-browser compatibility in HTML5?Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

How do I use the HTML5 <time> element to represent dates and times semantically?How do I use the HTML5 <time> element to represent dates and times semantically?Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software