Answer the question
In order to leave comments, you need to log in
PHP: Why is the encoding of a single character of a string different from the encoding of the string itself?
There is an archive, it contains files with names in Russian.
Using ZipArchive, I open the archive, and I want to unpack only those files whose name begins with the letter U, in Russian.
It didn’t work right away, it turned out that ZipArchive works in CP866, so I did this:
$filename = $zip->getNameIndex($i);
$filename = iconv('CP866', 'utf-8', $filename);
echo $filename;
mb_internal_encoding("utf-8");
substr($filename, 0, 2)
, or use another function:mb_substr($filename, 0, 1)
Answer the question
In order to leave comments, you need to log in
No one has made such buttons as pictures for a long time, they use css for this.
This can be done manually, or you can use online constructors like this https://www.css3buttongenerator.com/
here is a small example:
Of course, I didn’t pick up the colors, fonts and sizes perfectly, but you can do it yourself
PS: corrected the shadow
- got this: "First character of the file: �"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question