User Tools

Site Tools


en:dev:284:charsets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:dev:284:charsets [15.11.2018 00:53] – created Manuela v.d.Deckenen:dev:284:charsets [15.11.2018 12:22] (current) – [Charactersets] Manuela v.d.Decken
Line 4: Line 4:
 To learn about the internals of UTF-8 you can visit **[[https://en.wikipedia.org/wiki/UTF-8|Wikipedia]]** To learn about the internals of UTF-8 you can visit **[[https://en.wikipedia.org/wiki/UTF-8|Wikipedia]]**
 <div info>\\ Both UTF-8 and UTF-8MB4 from mySQL are 100% compatible to UTF-8 from PHP.</div> <div info>\\ Both UTF-8 and UTF-8MB4 from mySQL are 100% compatible to UTF-8 from PHP.</div>
 +But do not worry, the whole chapter with the character sets, collations and so on is only half as complicated as it looks at first glance.\\
 +The knowledge of the character sets in the database is only really needed if you want to design new tables yourself.\\
 +But much more important to programmers is the handling of multibyte string functions in PHP. This can cause serious mistakes if you have not understood the background of the character sets.
  
 ===== UTF-8 and PHP ===== ===== UTF-8 and PHP =====
Line 45: Line 48:
  
 oops, your text is about 200 kB? You have lots of such? oops, your text is about 200 kB? You have lots of such?
 +===== UTF-8 and HTML =====
 +Today, all modern browsers are able to render UTF-8 encoded characters. Therefore, there is usually no longer the need to output special characters in HTML entity format.
 +
 +In any case, it will be helpful for the browser if at least one of the following meta tags is entered in the HEAD section of the HTML document.
 +<PHP><meta http-equiv="content-type" content="text/html;charset=utf-8">
 +
 +<meta charset="UTF-8"></PHP>
 ===== Collations ===== ===== Collations =====
 <div info>\\ Collations does not exist in PHP. These are only properties of text fields in database tables.</div> <div info>\\ Collations does not exist in PHP. These are only properties of text fields in database tables.</div>
en/dev/284/charsets.1542243187.txt.gz · Last modified: 15.11.2018 00:53 by Manuela v.d.Decken