From: walter harms Date: October 7 2008 12:10pm Subject: Re: C api - mysql_list_fields List-Archive: http://lists.mysql.com/mysql/214789 Message-Id: <48EB51AA.7030906@bfs.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Mike Aubury schrieb: > Excellent - this seems to be the issue - the show create table shows : > > mysql> show create table a\g > +-------+----------------------------------------------------------------------------------------+ > | Table | Create > Table | > +-------+----------------------------------------------------------------------------------------+ > | a | CREATE TABLE `a` ( > `blah` char(20) default NULL > ) ENGINE=MyISAM DEFAULT CHARSET=utf8 | > +-------+----------- > > > So - its utf8 (which I understand enough about to understand why its doing > what its doing!) > > So - the next question is... > Is there anyway in code I can find the 'fiddle' factor (1,3,or now possibly 4) > that I need to use to divide by to get back to the character width specified > in the CREATE TABLE ? > > why do you want to do that ? i would expect that mysql uses wchar_t for char() if utf8 is selected. re, wh