twistor/character-encoder
Composer 安装命令:
composer require twistor/character-encoder
包简介
README 文档
README
PHP library for detecting and converting character encodings.
The currently supported conversion methods are:
- mbstring
- iconv
- recode
Quick usage:
<?php use CharacterEncoder\EncoderFactory; $sample = 'The quick brown fox jumps over the lazy dog'; $encodings = array('utf-8', 'EUC-JP', 'ISO-8859-1'); $encoder = EncoderFactory::create($encodings); // Convert text to utf-8. Returns false if the encoding could not be detected. $utf8 = $encoder->toUtf8($sample); // Advanced usage. // Returns false if the encoding could not be detected. $detected = $encoder->detect($sample); $iso = $encoder->convert($sample, $detected, 'ISO-8859-1');
统计信息
- 总下载量: 8.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-12-04