miniflux-legacy/vendor/fguillot/picofeed/lib/PicoFeed/Encoding/Encoding.php
2015-01-28 21:57:34 -05:00

17 lines
338 B
PHP

<?php
namespace PicoFeed\Encoding;
class Encoding
{
public static function convert($input, $encoding)
{
if ($encoding === 'utf-8' || $encoding === '') {
return $input;
}
// convert input to utf-8; ignore malformed characters
return iconv($encoding, 'UTF-8//IGNORE', $input);
}
}