mb_internal_encoding

(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)

mb_internal_encodingSet/Get internal character encoding

Beschreibung

mb_internal_encoding(?string $encoding = null): string|bool

Set/Get the internal character encoding

Parameter-Liste

encoding

encoding is the character encoding name used for the HTTP input character encoding conversion, HTTP output character encoding conversion, and the default character encoding for string functions defined by the mbstring module. You should notice that the internal encoding is totally different from the one for multibyte regex.

Rückgabewerte

If encoding is set, then Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben. In this case, the character encoding for multibyte regex is NOT changed. If encoding is omitted, then the current character encoding name is returned.

Fehler/Exceptions

As of PHP 8.0.0, a ValueError is thrown if the value of encoding is an invalid encoding. Prior to PHP 8.0.0, a E_WARNING was emitted instead.

Changelog

Version Beschreibung
8.0.0 encoding ist nun nullable (akzeptiert den null-Wert).
8.0.0 Now throws a ValueError if encoding is an invalid encoding. Previously a E_WARNING was emitted instead.

Beispiele

Beispiel #1 mb_internal_encoding() example

<?php
/* Set internal character encoding to UTF-8 */
mb_internal_encoding("UTF-8");

/* Display current internal character encoding */
echo mb_internal_encoding();
?>

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

PHP session lost after AJAX reload

Hi everyone, I’m running into a strange issue with PHP sessions in my project. I have a login system that works fine on normal page loads, but ...

Geschrieben von mikasabaggins am 20.04.2026 07:02:03
Forum: PHP Developer Forum
IGGM | Diablo 4: Lord of Hatred Copies Giveaway + Prep Event

The next expansion for Diablo IV — Lord of Hatred — arrives on April 28, bringing with it a massive wave of new content, character builds, and ...

Geschrieben von Cjacker am 20.04.2026 04:01:19
Forum: Apps und PHP Script Gesuche
IGGM April Offers 8% Off ARC Raiders Flashpoint Blueprints

Hey, Raiders! Did ARC Raiders Flashpoint Update live up to your expectations? Let me share my thoughts first: Flashpoint Update seems to have cran ...

Geschrieben von Cjacker am 20.04.2026 03:55:53
Forum: Apps und PHP Script Gesuche
IGGM: Buying Cheap MLB The Show 26 Stubs | All Platform | Live Update Price

I believe every MLB The Show 26 player dreams of assembling an invincible Diamond Dynasty lineup; however, a lack of sufficient Stubs - the game's ...

Geschrieben von Cjacker am 20.04.2026 03:50:21
Forum: Apps und PHP Script Gesuche