PHP Classes

File: examples/convert-sample.php

Recommend this page to a friend!
  Classes of Juraj Puchký   PHP Convert String from UTF8   examples/convert-sample.php   Download  
File: examples/convert-sample.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Convert String from UTF8
Convert a string from UTF-8
Author: By
Last change: fixed conversion utf8 - windows-1250 mb_encoding
utf8 to windows1250 and back, tool to generate table created
Date: 2 years ago
Size: 360 bytes
 

Contents

Class file image Download
<?php

require_once __DIR__ .'/../src/StringConvert.php';

use
BABA\Utils\StringConvert;

echo
"WINDOWS-1250:".StringConvert::utf8ToWindows1250("P?íli? ?lu?ou?ký k??, ?e?icha, éli?ka, m?ch.")."\n";
echo
"UTF-8:".StringConvert::windows1250ToUtf8(StringConvert::utf8ToWindows1250("P?íli? ?lu?ou?ký k??, ?e?icha, éli?ka, m?ch."))."\n";