Re: Encoding problem with C API
Posted by:
Thomas Rix
Date: September 23, 2005 12:47AM
I know this thread is a little bit outdated, but i had similar problems and happened upon this thread via Google, so others might too...
A database client was to be compiled on Max OS X.4 wich has access to a text column with UTF-8 - encoding. Output is displayed in MacRoman, default charset was Latin1. Though the conversion was easy, i lost characters on the way from database to screen.
The solution was:
mysql_query(mysql,"SET NAMES 'utf8'"); /* note the apostrophes: 'utf8' */
mysql_query(mysql,"SET CHARACTER SET utf8"); /* no apostrohes */
Everything was set on UTF-8 and worked fine.
Subject
Views
Written By
Posted
7676
April 10, 2005 08:52AM
3811
April 14, 2005 05:23AM
6430
April 15, 2005 08:37AM
4056
May 07, 2005 08:06AM
Re: Encoding problem with C API
6187
September 23, 2005 12:47AM
10608
October 08, 2005 03:20AM
5006
October 15, 2005 10:48AM
3802
November 27, 2005 12:33AM
3924
August 29, 2007 05:28AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.