News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brian Swan's Blog:
SQL Server Driver for PHP Connection Options CharacterSet
February 28, 2011 @ 12:15:33

Brian Swan has posted another in his series looking at connection options for the SQL Server driver for PHP. In his latest he looks at the "CharacterSet" setting, an easy way to define which encoding the remote database is using.

One thing that helped me understand the CharacterSet option was to realize that its name is a bit misleading (although it seems to be inline with other uses of CharacterSet or charset). It is used to specify the encoding of data that is being sent to the server, not the character set. With that in mind, the possible values for the option begin to make sense: SQLSRV_ENC_CHAR, SQLSRV_ENC_BINARY, and UTF-8.

He looks at each of these three options in more detail - SQLSRV_ENC_CHAR being the default, SQLSRV_ENC_BINARY when binary data is needed and UTF-8 when, obviously, you need UTF-8 data transfer between the client and server.

0 comments voice your opinion now!
sqlserver connection option characterset encoding


blog comments powered by Disqus

Similar Posts

DeveloperTutorials.com: Port Scanning and Service Status Checking in PHP

Alex Netkachov's Blog: Microsoft's SQL Server 2005 driver for PHP

Eran Galperin's Blog: Breaking Down The PayPal API

Christopher Jones' Blog: Customer Interview on PHP & Oracle 11g Connection Pooling (DRCP) in Oracle

Christopher Jones' Blog: When a few seconds are important: improving PHP Oracle connection speed


Community Events

Don't see your event here?
Let us know!


example laravel security version opinion laravel5 library framework community php7 podcast introduction video release interview unittest language api series voicesoftheelephpant

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework