nickodimm (nickodimm) wrote in code_wtf,
nickodimm
nickodimm
code_wtf

как говорится, попытка - не пытка

горячие калифорнийские .... пишут:          

           
// Try replacing both lowercase utf-8 and upper UTF-8 and similar combinations.

          // Covering all cases here.

          $html = str_replace('<meta charset="UTF-8"></meta>', '<meta content="text/html; charset=UTF-8"></meta>', $html);

          $html = str_replace('<meta charset="utf-8"/>', '<meta content="text/html; charset=UTF-8"></meta>', $html);

          $html = str_replace('<meta charset="UTF-8"/>', '<meta content="text/html; charset=UTF-8"></meta>', $html);

          $html = str_replace('<meta charset="UTF-8" />', '<meta content="text/html; charset=UTF-8"></meta>', $html);

  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 8 comments