PHP Character Encoding Requirements

Encodings of the following types are safely used with PHP.

  • A singlebyte encoding,

    • which has ASCII-compatible (ISO646 compatible) mappings for the characters in range of 00h to 7fh.

  • A multibyte encoding,

    • which has ASCII-compatible mappings for the characters in range of 00h to 7fh.
    • which don't use ISO2022 escape sequences.
    • which don't use a value from 00h to 7fh in any of the compounded bytes that represents a single character.

These are examples of character encodings that are unlikely to work with PHP.

JIS, SJIS, ISO-2022-JP, BIG-5

Although PHP scripts written in any of those encodings might not work, especially in the case where encoded strings appear as identifiers or literals in the script, you can almost avoid using these encodings by setting up the mbstring's transparent encoding filter function for incoming HTTP queries.

Hinweis:

It's highly discouraged to use SJIS, BIG5, CP936, CP949 and GB18030 for the internal encoding unless you are familiar with the parser, the scanner and the character encoding.

Hinweis:

If you are connecting to a database with PHP, it is recommended that you use the same character encoding for both the database and the internal encoding for ease of use and better performance.

If you are using PostgreSQL, the character encoding used in the database and the one used in PHP may differ as it supports automatic character set conversion between the backend and the frontend.

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

italopram Koop anoniem. Citalopram zonder recept - Citalopram goedkoop bestellen. Zw

Koop anoniem Citalopram. Citalopram zonder recept Kwaliteitsmedicijnen nodig zonder gedoe? Onze online apotheek is er om u te helpen! Ontdek een b ...

Geschrieben von travelder am 18.06.2026 20:34:04
Forum: Projekthilfe
isinopril Magasin fiable. acheter Lisinopril mylan - Tavor Pharmacie En Ligne . Le H

Magasin fiable Lisinopril. acheter Lisinopril mylan Recherchez des médicaments de haute qualité sans quitter votre maison ? N'attendez plus ! No ...

Geschrieben von drawer am 18.06.2026 20:33:55
Forum: IT-Security
ildenafil Zonder recept. Betaal Sildenafil Visa - Sildenafil Koop online express ver

Zonder recept Sildenafil. Betaal Sildenafil Visa Op zoek naar eersteklas medicijnen zonder dat u uw huis hoeft te verlaten? Zoek niet verder! Onze ...

Geschrieben von travelder am 18.06.2026 20:32:28
Forum: Projekthilfe
odafinil Magasin fiable. acheter Modafinil puissant sur internet - effets secondaire

Magasin fiable Modafinil. acheter Modafinil puissant sur internet Avez besoin de médicaments de haute qualité ? Nous sommes là pour vous ! Notr ...

Geschrieben von drawer am 18.06.2026 20:32:17
Forum: IT-Security