From: Warren Young Date: June 23 2008 5:27pm Subject: Re: mysqlpp::String and UTF-8 List-Archive: http://lists.mysql.com/plusplus/7702 Message-Id: <3A2271DB-48BE-4849-AA6A-49CDDC2151F1@etr-usa.com> MIME-Version: 1.0 (Apple Message framework v924) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Jun 23, 2008, at 1:49 AM, Soul Boy wrote: > I read your Unicode section and I am still not sure about the String > class and UTF-8 data. > > If I call size() when the string will it return "Return number of > characters in string." or the number of bytes or what ? mysqlpp::String does not do any data conversion. Therefore, you will get a count of the raw UTF-8 bytes, not the number of Unicode characters. You will need to use something like std::wstring to store a "widened" version of the string, and count the characters that way. I've added a Wishlist item to make this easier within MySQL++.