What is required encoding in txt files and encoding html pages when using txt files in php scripts (in the same html page)? Thank you in advance.
3 answers
If you save using a text editor from windows (notepad), then ANSI (encoding) is the "that". In HTML, I would advise you to use cp1251 encoding, although it is already out of date and it is time to switch to utf-8, the page encoding is indicated as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>Untitled Document</title> </head> <body> </body> </html>
- Repeatedly already met here the term "ANSI encoding". What is it ? CP-1251, CP-866 or ISO-8859-5 or where to look at it? - avp
- ANSI - the encoding in is indicated in the notepad, and when you press Ctr + S, a window will appear, asking you to enter the file name, and below the encoding. cp1251 is a coding for html pages, but it is better to use utf-8, just type in charset = windows-1251 or charset = utf-8. - Andrey Arshinov
- ANSI - checked. So these clever men in Notepad called CP-1251. - avp
- Then try utf-8 to create your own html pages, I can’t say anything about this encoding, since I use cp1251. - Andrei Arshinov
- one[ANSI (values)] [1]> On Microsoft Windows systems, the code> ANSI page (English ANSI code page,> ACP) can mean:>> - Windows-1252 (in the context of American and Western European localizations)> - Windows-1251 - the so-called earlier corporation Microsoft "ANSI Cyrillic" (English ANSI Cyrillic)> - In general, any system encoding specified in the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\ACP
And so, of course, ANSI is not encoding. [1]: en.wikipedia.org/wiki/… - Ilya Pirogov
|
The encoding must be the same as on the HTML page. It is preferable to use only UTF-8 everywhere.
|
if you think seriously to program, then only utf8 !!! There will be no problems with Russian regulars, for example. And indeed it is international and universal.
- So much so that soon yutf8 will become the standard, and in general - it's time to get used to the rules of good tone, of course - you can work wonders on Denver, but put Apache and muscle with your hands - it only adds knowledge and confidence. - tukan
- By the way, universal - rather UTF16. There is only one problem with it - the volume of the database)) - Sh4dow
|