miniflux-legacy/vendor/fguillot/picofeed/lib/PicoFeed/Encoding/Encoding.php
Mathias Kresin 7f335a533d update dependencies
- fixes #336
2015-03-01 19:56:11 +01:00

22 lines
388 B
PHP

<?php
namespace PicoFeed\Encoding;
/**
* Encoding class
*
* @package 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);
}
}