List:MySQL++« Previous MessageNext Message »
From:dienw Date:February 15 2005 6:46pm
View as plain text  

> It's my understanding that the C API uses UTF-8 as its data 
> representation.  So, the only trick is getting from your 
> wide-character
> strings* to UTF-8 before inserting those strings into the 
> database.
> Thanks in advance for your report telling us whether/if it 
> works as I described.  :)  I haven't had a reason to use 
> Unicode yet, but I'm seeing some pressure to start, so I hope 
> you can blaze some trail for me.

I wonder how easy it will be going. I have prepared for the worst,
and amazed that the conversion is going so smooth.

Previously for this UNICODE thing, I rewrited some of
my database code which containing string into wide string.

Since the mysql interface is requesting char*, I just convert
the wide string into char* (i.e.: MBCS) using WideCharToMultiByte()
with UTF8 as conversion encoding.

It's compiled, and now I need to know whether it's really working
or not.

I have doubt that time, plus this is quite a new thing to touch to
convert back and forth from wide string (wchar) to char, and I'm not
knowing mysql (and sql) too well regarding unicode.

So I did a search for information whether it's correct,
in the web and asked to this list. And Warren suggesting
the same solution which is absolutely right.

Meanwhile, I was starting to recreate my old app, to enter UNICODE char
instead of ASCII, save it to db, query, display, and remove.
(it's a windows app).

And it's amazed me that once all of the code is set and coupled into
my database interface, everything is run smoothly and easily.
First test is just working very well. I typed from IME Chinese chars,
saved and loaded well. I follow it by several other chars, Chinese,
Japanese (I'm only install 2 IME keyboard :) )

That's soo smooth while I expect the worst might happen :)

Haha.. almost blogging :P thanks all especially Warren, I'm so happy
today as the last bottleneck (interfacing to db) while converting into
UNICODE is finally solved, so we have established a solid base for
our multi-language ready app (games actually) and can continue our work.



NB: If I have problem that I would encountered on my unicode db system,
I'll share here.

UNICODEdienw12 Feb
Re: UNICODEWarren Young14 Feb
  • RE: UNICODEdienw15 Feb