Re: How exactly do I get UTF-8 data into SQL Server on Windows via ODBC SQL Native Client 10.0?
| From: | Pierre Joye | Date: | Wed, 07 Oct 2009 09:00:01 +0000 |
| Subject: | Re: How exactly do I get UTF-8 data into SQL Server on Windows via ODBC SQL Native Client 10.0? | ||
| References: | 1 | Groups: | php.db php.windows |
| Request: | Send a blank email to php-windows+get-29634@lists.php.net to get a copy of this message | ||
hi,
On Wed, Oct 7, 2009 at 10:36 AM, Richard Quadling
<rquadling@googlemail.com> wrote:
> Hi.
>
> I'm trying to get data into an MS SQL Server 2005 database. The data
> is coming to me as UTF-8 encoded data.
Yes, pdo ODBC converts the results from UCS-2 to UTF-8. UCS-2 is what
sqlserver uses.
> The data is primarily European
> languages (so I've got a few accented characters), but I know I've got
> Korean, Vietnamese and some Japanese coming later.
>
> I'm using PHP 5.3.2-dev. The SQL Server is 2005 and the ODBC driver
> I'm using is SQL Native Client 10.0
> I've tried using ...
>
> $s_Recipient = mb_convert_encoding($s_Recipient, 'UCS-2', 'UTF-8');
Why do you want to go back to UCS-2?
Cheers,
--
Pierre
http://blog.thepimp.net | http://www.libgd.org