PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Rob Allen's Blog: Some notes on SQL Server blobs with sqlsrv

Note: This article was originally published at PHPDeveloper on 23 November 2010.
PHPDeveloper

In this new post to his blog, Rob Allen has posted notes on some of his experience in working with blobs with SQL Server using UTF-8.

This turned out to be easy enough: Use ntext, nvarchar types in the database and add resources.db.params.driver_options.CharacterSet = "UTF-8" to your application.ini

He also includes some code to fix a problem he spotted with storing binary data into a varbinary field giving him an error about string translation. The fix came in the way of replacing the direct file_get_contents assignment to a variable over to a binding method that specified the data type as well.