You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sann Maung <ya...@yahoo.com> on 2007/02/10 04:54:40 UTC
FTP for Japanese file names
I am using FTP task to transfer the files using ant.
Under normal circumstances, it is working fine.
However, if the filenames are in Japanese characters,
(eg. Kanji) then it becomes an error and the file
transfer cannot continue.
<?xml version="1.0" encoding="UTF-8"?>
<project name="transferPut" basedir="." default="ftp">
<target name="ftp">
<ftp server="xxx"
userid="yyy"
password="abcd"
action="get"
remotedir="/somedir/"
newer="true"
timediffauto="true"
preservelastmodified="true">
<fileset dir="../jpnGet/get/">
<include name="download/**/**"/>
</fileset>
</ftp>
</target>
</project>
I thought that kanji needs UTF-16, so I tried to
change the encoding to UTF-16. It causes another
error. Looks like I am not allowed to define in
build.xml file as encoding UTF-16.
I am not sure. Can anybody suggest a way to do it?
____________________________________________________________________________________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: FTP for Japanese file names
Posted by Sann Maung <ya...@yahoo.com>.
Hi,
Kanji characters are not included in build.xml.
Only there are some file names with kanji characters
are included in some directory.
rgds,
Sann Maung
--- Antoine Levy-Lambert <an...@gmx.de> wrote:
> Hello Sann,
>
>
> On Feb 9, 2007, at 10:54 PM, Sann Maung wrote:
> > I am using FTP task to transfer the files using
> ant.
> > Under normal circumstances, it is working fine.
> > However, if the filenames are in Japanese
> characters,
> > (eg. Kanji) then it becomes an error and the file
> > transfer cannot continue.
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <project name="transferPut" basedir="."
> default="ftp">
> > <target name="ftp">
> > <ftp server="xxx"
> > userid="yyy"
> > password="abcd"
> > action="get"
> > remotedir="/somedir/"
> > newer="true"
> > timediffauto="true"
> > preservelastmodified="true">
> > <fileset dir="../jpnGet/get/">
> > <include name="download/**/**"/>
> > </fileset>
> > </ftp>
> > </target>
> > </project>
>
> >
>
> do you mean that your build.xml file contains really
> some kanjis, for
> instance in the remotedir attribute ? or have some
> of the files which
> are under somedir and which match download/**/**
> japanese names ?
>
> It would be interesting if you could download both
> the sources of ant
> and the sources of commons-net and debug that to
> find out what is
> going wrong.
>
> In theory everything Java supports all languages,
> but between theory
> and practice ...
>
>
> >
> > I thought that kanji needs UTF-16, so I tried to
> > change the encoding to UTF-16. It causes another
> > error. Looks like I am not allowed to define in
> > build.xml file as encoding UTF-16.
> I do not think that the encoding of your build file
> is the problem,
> and the encoding of the build file does not affect
> how ant and the
> libraries used by ant such as commons-net work.
> So you can stick to UTF-8.
> >
> > I am not sure. Can anybody suggest a way to do it?
> >
> >
> >
> Best regards,
>
> Antoine
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>
____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: FTP for Japanese file names
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Sann,
On Feb 9, 2007, at 10:54 PM, Sann Maung wrote:
> I am using FTP task to transfer the files using ant.
> Under normal circumstances, it is working fine.
> However, if the filenames are in Japanese characters,
> (eg. Kanji) then it becomes an error and the file
> transfer cannot continue.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="transferPut" basedir="." default="ftp">
> <target name="ftp">
> <ftp server="xxx"
> userid="yyy"
> password="abcd"
> action="get"
> remotedir="/somedir/"
> newer="true"
> timediffauto="true"
> preservelastmodified="true">
> <fileset dir="../jpnGet/get/">
> <include name="download/**/**"/>
> </fileset>
> </ftp>
> </target>
> </project>
>
do you mean that your build.xml file contains really some kanjis, for
instance in the remotedir attribute ? or have some of the files which
are under somedir and which match download/**/** japanese names ?
It would be interesting if you could download both the sources of ant
and the sources of commons-net and debug that to find out what is
going wrong.
In theory everything Java supports all languages, but between theory
and practice ...
>
> I thought that kanji needs UTF-16, so I tried to
> change the encoding to UTF-16. It causes another
> error. Looks like I am not allowed to define in
> build.xml file as encoding UTF-16.
I do not think that the encoding of your build file is the problem,
and the encoding of the build file does not affect how ant and the
libraries used by ant such as commons-net work.
So you can stick to UTF-8.
>
> I am not sure. Can anybody suggest a way to do it?
>
>
>
Best regards,
Antoine
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org