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

Thiago Macieira thiago.macieira at trolltech.com
Wed Feb 11 08:11:43 CET 2009


tank wrote:
>Thiago Macieira 写道:
>> Em Terça-feira 10 Fevereiro 2009, às 13:17:12, 唐科 escreveu:
>>> 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.

>i want to know
>    how to put a file that's name is chinese ???

You can't. QFtp is limited to Latin 1.

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Software
      Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090211/3a789bf0/attachment.bin 


More information about the Qt-interest-old mailing list