A
A
ASMcoder-Source2022-02-09 22:58:10
PHP
ASMcoder-Source, 2022-02-09 22:58:10

How to select all extended latin characters in one fell swoop?

The text contains characters like these:
önwë㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮį...

I tried to add all the characters from this table
IZOBRAZENIE_2022-02-09_215456.png

But it didn’t help, there are characters with other codes, for example
ú

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Maxim E, 2016-02-07
@creativeworm

Source on Habré :

function file_force_download($file) {
  if (file_exists($file)) {
    // сбрасываем буфер вывода PHP, чтобы избежать переполнения памяти выделенной под скрипт
    // если этого не сделать файл будет читаться в память полностью!
    if (ob_get_level()) {
      ob_end_clean();
    }
    // заставляем браузер показать окно сохранения файла
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename=' . basename($file));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate');
    header('Pragma: public');
    header('Content-Length: ' . filesize($file));
    // читаем файл и отправляем его пользователю
    if ($fd = fopen($file, 'rb')) {
      while (!feof($fd)) {
        print fread($fd, 1024);
      }
      fclose($fd);
    }
    exit;
  }
}

E
entermix, 2016-02-07
@entermix

We need to send the correct headers to the browser.
There was already a similar question: How to display the received stream from PDF by curl?

A
Aleksey Ratnikov, 2016-02-07
@mahoho

$fileDescriptor = fopen('/path/to/file', 'w+');
curl_setopt($curl, CURLOPT_FILE, $fileDescriptor);

A
ASMcoder-Source, 2022-02-09
@ASMcoder-Source

https://stackoverflow.com/questions/11704182/regex...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question