Re: Just a question about Linux and UTF8 / Unicode Development
From: Sybren Stuvel (sybrenUSE_at_YOURthirdtower.imagination.com)
Date: 05 Nov 2003 17:33:59 GMT
firstname.lastname@example.org enlightened us with:
> I've a question regarding character encoding and development.
It would be nice to know what programming language you are using...
> But, in our lower level layers, we do not use Qt. In exemple we have
> a lot of classes and routines that open image, files etc... In those
> method, we're using "const char *", fopen(), open, write, fclose....
That's tricky with Unicode.
> But our product will surely be sold in China and Japan. A chinese
> team made some tests...and opening a chinese file with a chinese
> filename, it pretty failed :o))
Was the filename in Unicode? Or was it some Chinese codepage? That can
make a very big difference...
> Do you have any idea how I should manage my business to get it working
> with every kind of files...
You can't. Sorry, I've got a scientific education, so I'm rather
negative about being able to work with *every* kind of file. It is
possible to get things working without a problem on *nearly* every file
your client's might use, though.
> Would UTF8 fix this problem ?
> But, with a UTF8 filename, I can use it with a classic fopen()
> function ?
Sorry, I don't know anything about C and unicode. If you're not too deep
into the development phase, you might want to take a look at Python.
It's cross-platform, has support for QT, and even better: you can run it
on all supported platforms without compilation. You can also embed
existing C++/C code into Python for easy porting! As an example of
Python's power: a big lot of Google is programmed in Python.
-- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?