HTML5 + UTF-8: do I need to encode the GBP (£) character?

I thought utf-8 would only be able to handle neat £instead of converting to objects?

What is the correct way to handle GBP symbol with UTF-8 and HTML5?

(ps. don't think the html5 part should matter)


update:

Here's a test document:

<!doctype html>  
<head>
  <meta charset="utf-8">
  <title>GBP Test</title>
</head>

<body>
£55
<br />
&pound;55
</body>

Thank you all for your help.

For everyone who encounters this disorder, a problem arises with your text editor. Even Notepad formats in non utf-8.

DECISION:

UTF-8 read and write formats changed in my text editor ( PHP Designer )

+5
source share
2 answers

. .

UTF-8, , , ISO-8859-1. UTF-8 ISO-8859-1, , . .

: HTML-

+4

, , UTF-8 ( Content-Type, a meta charset xml encoding XHTML)...

, HTML- UTF-8, ( ):

  • &amp; = > &
  • &lt; = > <
  • &gt; = →
  • &quot; = > "

XHTML ( XML), ( , ):

  • &apos; = > '
  • &#39; = > '
  • &#x0027; = > '

( , 2 , &apos; HTML...)

, &, < > , "" (, ", " )...

HTML 5 Draft ...

+4

All Articles