Re: TIdMultiPartFormDataStream.AddFile and unicode FileName

Giganews Newsgroups
Subject: Re: TIdMultiPartFormDataStream.AddFile and unicode FileName
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Mon, 25 Sep 2006

"Dorin Marcoci" <marcod…@matrix.md> wrote in message
news:49FD58120D09E340marcod…@matrix.md...

> I have some troubles adding a file with unicode file name.
> AddField have this declaration:

Indy does not support Unicode at all.  You will not be able to do what you
are asking for.

> Is there another way to do this (without change indy implementation)?
> Like to add a stream?

You can add a file stream manually (call TIdMultipartFormDataStream's
Fields.Add() method and then fill in the details of the TIdFormDataField
object manually).  But you will have to expose access to
TIdMultipartFormDataStream's protected FSize member first so that you can
increment it with your custom stream size.  Also, the filename itself will
still be stored and transmited as Ansi instead of Unicode, so providing your
own stream from a unicode filename will not be very useful as the server
will still receive a converted filename that may be wrong.

Gambit

Replies

None

In response to

TIdMultiPartFormDataStream.AddFile and unicode FileName posted by Dorin Marcoci on Sun, 24 Sep 2006