Answer the question
In order to leave comments, you need to log in
How to convert UTF-8 encoding to Windows-1251 (non-standard question)?
Hi friends. I've been working with the web for 3 years now, but I haven't come across this one yet. What is the point:
I have a Cyrillic text with UTF-8 encoding and it is displayed normally.
I need to change the encoding to windows-1251 so that the Cyrillic text is also normally readable. And here's something, well, I can't figure it out at all, how to do it?
Answer the question
In order to leave comments, you need to log in
for a large number of files there is a one-liner on powershell:
One catch: encoding default - takes the system encoding.
You can check that this is windows 1251 like this (powershell):[System.Text.Encoding]::Default.Codepage
fi2.php.net/manual/ru/function.iconv.php
Or what programming language?
Or you need a bike for bit-by-bit processing of each character from a double-byte encoding to a single-byte one.
Do you mean on your own and not in program code? Then with the help of your text editor that you use. For example, if you prefer Sublime Text , then just use the menu item File->Save with encoding > Cyrillic (Windows 1251)
use iconv, especially if there are
a lot of iconv files for windows
dbaportal.eu/2012/10/24/iconv-for-windows
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question