How to remove the oxidation of copper
What if the bookmaker does not pay the money

How to register encoding

How to register encoding

Until all the documents on the network will notuse the same for all countries and peoples of the set of characters UTF (Unicode Transformation Format), it is obligatory to specify the encoding used in the document HTML or XML.

Otherwise, the pages that appear quite normal in your browser, can be transformed into a notorious unreadable "unreadable" in Internet browsers of visitors to your site.



The tag meta, indicating charsetAs used herein should beelement within the head as close to its upper portion. This formulation of the organization W3C (The World Wide Web Consortium), which is engaged in the development and implementation of technology standards for the Internet. Himself the tag in the HTML-document might look like this: & lt-meta http-equiv = »Content-type» content = »text / html-charset = utf-8" & gt-This directive is to be used in the pages written by the standard HTML 4.01 and XHTML 1.x. To document XHTML-final bracket «& gt-» must be replaced by »/ & gt-«. In this sample, after a specified charset = unicode charset utf-8. Of course, you need to replace utf-8 to its value - that in which the document was stored, or in which the content is retrieved from a database. For the Russian alphabet other than utf-8, it may be of value windows-1251 (the most common), koi8-r, koi8-u, iso-ir-111, iso-8859-5, x-cp866, ibm855, x-mac -cyrillic.


To specify charset in the page of the site - click to editthe desired document. Find out what the syntax of the page corresponds to the code - it is stated in the beginning, in the tag & lt- DOCTYPE ... Depending on the use of standards (HTML or XHTML), prepare the tag code based on the data of the above!. Then get in the source code of the page tag & lt- / title & gt- - usually specify the encoding placed immediately after it. If this tag for some reason there is no code in your document, then locate the tag that opens the header portion of HTML - & lt-head & gt-. Insert the prepared code after it and save the document.


If a page uses an external file CSS-styles and in these files there are elements that use characters from national alphabets, it should also indicate they used charset. In the first line of the file, add styles: @charset «windows-1251» -windows-1251 to replace your desired znachenie.Krome addition, it is possible to specify charsetThat the browser should use whenclick on a link. To do this, the link tag should be placed charset attribute to the desired value. For example: & lt-a href = »http://www.kakprosto.ru» charset = »windows-1251" & gt-Just Like & lt- / a & gt-!

Comments are closed.