Re: Just a question about Linux and UTF8 / Unicode Development

From: Sybren Stuvel (sybrenUSE_at_YOURthirdtower.imagination.com)
Date: 11/05/03


Date: 05 Nov 2003 17:33:59 GMT

katiki@kodak.com 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 ?

Probably.

> 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.

Sybren

-- 
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? 


Relevant Pages

  • Re: Can Python write foreign characters to the console?
    ... > I was just told about Python. ... > Can or does Python write unicode to the screen? ... > I want to find a programming language that can write German ... > limit one to the 127 characters of ascii. ...
    (comp.lang.python)
  • Re: Python usage numbers
    ... If Unicode in Python is causing you more work, ... your programming language has facilities like str.upper, ...
    (comp.lang.python)
  • Re: how can i write a hello world in chinese with python
    ... #!/usr/bin/env python ... import EasyDialogs ... As I know mac is unicode based,how can I display chinese on the screen? ...
    (comp.lang.python)
  • Re: Python usage numbers
    ... If Unicode in Python is causing you more work, ... your programming language has facilities like str.upper, ...
    (comp.lang.python)
  • Python 2nd favorite language in Linux Journal poll
    ... favorite programming language. ... In the 2005 poll, Python is 2nd, its ... three is Perl, while PHP slips to fourth place, closely followed by ... The voting was close this year, too; only 59 votes separated C ...
    (comp.lang.python)