How to change the encoding of the php document is in windows-1251 to utf-8?

Hello!
How to change the encoding of the php document is in windows-1251 to utf-8?
A simple renaming $config['charset'] = "windows-1251"; and the like does not help...
September 26th 19 at 06:18
3 answers
September 26th 19 at 06:20
Solution
In the editor where you made the document, select a different encoding and all
September 26th 19 at 06:22
To change the encoding of the php document as the same as any other text file.
For example in notepad++ an existing file need only "convert" in the right encoding -> menu -> encoding -> Convert to UTF-8 without BOM.
And if You have a new file, then select menu -> encoding -> encode in UTF-8 without bom.
September 26th 19 at 06:24
use
<meta charset="utf-8">

or

header("Content-Type: text/html; charset=utf-8");

Find more questions by tags PHP