2017 © Pedro Peláez
 

library character-encoder

image

twistor/character-encoder

  • Friday, December 12, 2014
  • by twistor
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,395 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

character-encoder

Build Status, (*1)

PHP library for detecting and converting character encodings., (*2)

The currently supported conversion methods are: - mbstring - iconv - recode, (*3)

Quick usage:, (*4)

<?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');

The Versions

12/12 2014

dev-master

9999999-dev

  Sources   Download

The Requires

  • php >=5.3