Skip to content

Instantly share code, notes, and snippets.

@aidvu
Created May 30, 2014 11:48
Show Gist options
  • Save aidvu/82f5e3a18b199a794b48 to your computer and use it in GitHub Desktop.
Save aidvu/82f5e3a18b199a794b48 to your computer and use it in GitHub Desktop.
iconv/mb_convert_encoding
<?php
$text = '₩';
$fromEncoding = 'UTF-8';
$toEncoding = 'EUC-KR';
echo iconv($toEncoding, $fromEncoding, iconv($fromEncoding, $toEncoding, $text));
echo "\n";
echo mb_convert_encoding(mb_convert_encoding($text, $toEncoding, $fromEncoding), $fromEncoding, $toEncoding);
echo "\n";
echo $text;
echo "\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment