PHP Doku:: Set character set for stream encoding - function.stream-encoding.html

Verlauf / Chronik / History: (6) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige GrunderweiterungenStreamsStream Funktionenstream_encoding

Ein Service von Reinhard Neidl - Webprogrammierung.

Stream Funktionen

<<stream_copy_to_stream

stream_filter_append>>

stream_encoding

(No version information available, might only be in SVN)

stream_encodingSet character set for stream encoding

Beschreibung

bool stream_encoding ( resource $stream [, string $encoding ] )
Warnung

Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Argumente zur Verfügung.


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
hajo at clansphere dot de
20.06.2009 0:46
with php 5.2+ you can (should!) use the following line next to e.g. fopen() and specify the encoding of the content:

<?php
$charset
= 'UTF-8';

stream_encoding($handle, $charset);
?>

in addition php 6 seems to need this since it triggers a notice level error if special chars must be converted and the above command is not specified (binary data excluded - just talkin bout clear text in this comment)



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)