Web encoding 元则

  • 871 views
Uploaded on

编码,encoding,content-type,charset都有哪些区别?他们的优先级呢?

编码,encoding,content-type,charset都有哪些区别?他们的优先级呢?

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
871
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
5
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Web Text Encoding 元则
  • 2. Decode Transfer Encode textbrowser Web Server editor Content-Type: charset= save as ... Default charset html <meta charset=””
  • 3. 名词• content-type• charset• encoding• escape
  • 4. Html• http头部的content-type > html meta 标签 > 链接到外部资源标签的charset属性• 显示字符:原字符字符, char reference, html entity (€ &#8364; &euro;)
  • 5. url, form• url: ASCII only, Percent encoding• form submit• ajax submit
  • 6. Javascript• String.fromCharCode: 通过unicode数值得 到对应字符• charCodeAt:得到字符unicode数值• escape, encodeURI, encodeURIComponent
  • 7. alipay• page, uisvr gbk, why gbk?• js css utf-8• ajax utf-8• sofa• login goto
  • 8. • 浏览器在地址栏输入中 文参数• 调试工具