I'm writing a PHP server and the client is sending data in a specific character encoding. Now, I want to tell the server to read and write data in this same character encoding set.
How should I specify the character encoding set for PHP's socket_read and socket_write methods?