[Qt-interest] QFtp put functions has a bug?

Scott Aron Bloom Scott.Bloom at sabgroup.com
Wed Feb 11 01:43:48 CET 2009


\> >> OS:debian
> >> Qt:Qt-4.3.4
> >>
> >> first i use next code to set application code
> >>     QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
> >> but when i use QFtp's function put(file, string_server);
> >> when completed, i found that the file's name is crashed, but the file's
> >> context is right.
> >>
> >> i debug to:
> >>     string_server = "中国.txt";
> >>     qDebug() << strlen(string_server.toAscii().data());
> >>     this is = 10, is right, 3 * 2 + 4 = 10
> >>
> >
> > QFtp only supports Latin1.
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> i want to know
>     how to put a file that's name is chinese ???
> can you give a example?
> 
> thanks
> mumutou
> lemote

[Scott Aron Bloom] 
I think your going to find this is going to be more then a QT issue...

I find so many applications (including some shells) will simply not show the proper names of files if they are save with a Unicode name...

Though I would think, QT could support Unicode filename right down to the "libc" function calls (fopen or the equivalent being accessed)

Scott



More information about the Qt-interest-old mailing list