A
A
askarkum2021-12-15 07:57:56
Apache HTTP Server
askarkum, 2021-12-15 07:57:56

Apache and Cyrillic?

I installed Debian 11 with Apache on a virtual machine, raised a one-page site in html with a couple of lines in Cyrillic, and on the output there are krakozyabras instead of Russian letters. I understand that the topic has already been beaten, but I could not find a solution in Google.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nowm, 2021-12-15
@askarkum

Judging by the screenshot in the comments to the question, you have a UTF-8 encoded file.
In Apache
The first way: in the httpd.conf file of the Apache itself, or in the .htaccess file, which is located in the same folder as the HTML file (if it is not there, then create it), you can write the following directive:
AddDefaultCharset utf-8
Or like this (if the encoding only needs to be set for HTML files):
AddCharset utf-8 .html
In HTML
The second way: in the HTML file itself, in a block <head>, you can add a tag that tells the browser that this is UTF-8.
<meta charset="UTF-8"/>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question