Skip to content

Instantly share code, notes, and snippets.

@takatoshiono
Created February 7, 2014 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takatoshiono/8857495 to your computer and use it in GitHub Desktop.
Save takatoshiono/8857495 to your computer and use it in GitHub Desktop.
Smarty3 と mb_internal_encoding
<?php
mb_internal_encoding('EUC-JP');
// http://www.smarty.net/docs/en/charset.tpl
// define('SMARTY_RESOURCE_CHAR_SET', 'EUC-JP');
require_once 'lib/smarty/Smarty.class.php'; // Smarty3
print mb_internal_encoding() . "\n"; // => EUC-JP
$smarty = new Smarty();
print mb_internal_encoding() . "\n"; // => UTF-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment