Download the PHP package fossar/guzzle-transcoder without Composer
On this page you can find all versions of the php package fossar/guzzle-transcoder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fossar/guzzle-transcoder
More information about fossar/guzzle-transcoder
Files in fossar/guzzle-transcoder
Package guzzle-transcoder
Short Description Guzzle plugin that converts responses to UTF-8
License MIT
Informations about the package guzzle-transcoder
guzzle-transcoder
This package provides a Guzzle 6/7 middleware that transparently converts documents obtained by Guzzle from its native encoding to UTF-8 (or any other specified encoding). It supports the following features:
- Detection of charset from
Content-Type
HTTP header. - Detection of charset from
meta
element in HTML document. - Detection of charset from XML declaration in RSS and other XML documents.
- Updating the
Content-Type
header in theResponse
object according to target encoding. - Updating the metadata in the
Response
body according to target encoding (not enabled by default).
Installation
It is recommended to install the library using Composer:
Usage
Basic example
Full example
Credits
It is largely based on Pascal Landau’s guzzle-auto-charset-encoding-subscriber and web-utility libraries.
We are using Transcoder library. This allows us to fall back to iconv
when mbstring
is not available or an encoding is not supported by it.
The source code is available under the terms of MIT license
All versions of guzzle-transcoder with dependencies
guzzlehttp/guzzle Version ^6.3 || ^7.0
fossar/transcoder Version ^1.0 || ^2.0
guzzlehttp/psr7 Version ^1.7 || ^2.0