Web Text Encoding       元则
Decode           Transfer                              Encode                                                        textb...
名词• content-type• charset• encoding• escape
Html• http头部的content-type > html meta 标签  > 链接到外部资源标签的charset属性• 显示字符:原字符字符, char reference,  html entity (€   €   €)
url, form• url: ASCII only, Percent encoding• form submit• ajax submit
Javascript• String.fromCharCode: 通过unicode数值得  到对应字符• charCodeAt:得到字符unicode数值• escape, encodeURI, encodeURIComponent
alipay•   page, uisvr gbk, why gbk?•   js css utf-8•   ajax utf-8•   sofa•   login goto
•   浏览器在地址栏输入中    文参数•   调试工具
Web encoding 元则
Upcoming SlideShare
Loading in …5
×

Web encoding 元则

1,207 views

Published on

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

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,207
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Web encoding 元则

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

×