コード例 #1
0
 /**
  * @dataProvider providerTranscode
  */
 public function testTranscode($defaultEncoding, $forceMbString, $from, $to, $iconvTranslit, $string, $expected)
 {
     $transcoder = new Transcoder($defaultEncoding, $forceMbString);
     $this->assertEquals($expected, $transcoder->transcode($string, $from, $to, $iconvTranslit));
 }
コード例 #2
0
ファイル: AbstractCsv.php プロジェクト: csanquer/colibri-csv
 /**
  *
  * @param  string $str
  * @param  string $from
  * @param  string $to
  * @return string
  */
 protected function convertEncoding($str, $from, $to)
 {
     return $str !== false ? $this->transcoder->transcode($str, $from, $to, $this->dialect->getTranslit()) : $str;
 }