Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if html cannot automatically select the encoding?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how html cannot automatically choose what to do with encodings. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

When using IE as a reader on the windows operating system. What kind of title happens over and over again: when browsing a web page that uses UTF-8 encoding, the browser cannot automatically detect (that is, when the "passive choice" code is not set) the encoding used by the page. Even if the web page has declared the encoding format:

As a result, some pages containing Chinese UTF-8 codes are pregnant with blank output.

Assuming that you are using Mozilla, Mozilla Firefox, and Sarafi readers, this will not pose a problem. This is because when IE interprets web page coding, it gives priority to the tags in HTML, and it will be the message in HTTP header in the future, while the browsers in the mozilla series are just similar.

Because UTF-8 flashes one Chinese character for 3 bytes, while the ordinary GB2312 or BIG5 is two. When the page is output, because of the above notice, when the hunter analyzes and inputs the form, it is assumed that when there are an odd number of full-width characters in front, IE regards UTF-8 as the emergence of half a Chinese character when two bytes are appreciated. At this time, the half Chinese character will be harmonious.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report