Re: [PHP-WIN] How exactly do I get UTF-8 data into SQL Server on Windows via ODBC SQL Native Client 10.0?

Pierre Joye <[email protected]>
Newsgroups gmane.comp.php.database,gmane.comp.php.windows
Message-ID <[email protected]>
hi,

On Wed, Oct 7, 2009 at 10:36 AM, Richard Quadling
<[email protected]> 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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.