cturbelin/rserve-php

Explicity specify encoding

Opened this issue · 1 comments

The Rserve-php requires that the Rserve server is configured to use native encoding. If the server default encoding is utf8, my connection chokes when a string contains a non-ASCII character.

I suggest that Rserve-php always specifies the encoding explicitly when connecting to the server (e.g. in the constructor), making it work independently of the default encoding configured on the server.

$this->sendCommand(self::CMD_setEncoding, _rserve_make_data(self::DT_STRING, 'native'));

Thank you, this feature has been added. encoding will be set if "encoding" entry is specified in $params array of constructor