You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by fanyun <yu...@vtradex.com> on 2001/08/10 06:12:07 UTC
Ant SQL call and double byte charactors
Hi all:
I am using ant 1.3. When I want use ant to execute an sql file which has some chinese charactor inside it, I find ant seems can not handle double bytes correctly. Is there any solution?
The sql file its self can be installed correctly using
mysql < a.sql
Regards
fanyun
-----Original Message-----
From: Jason Rogers [mailto:jason.rogers@tumbleweed.com]
Sent: Friday, August 10, 2001 2:00 AM
To: 'ant-user@jakarta.apache.org'
Subject: RE: How do I remove multiple directories?
I think you could do the following:
<delete includeEmptyDirs="true" >
<fileset dir="parent_of_dirname-*" />
</delete>
If that doesn't work, do an <exec/> on the *nix command.
-Jason
> -----Original Message-----
> From: Ivan Bilenjkij [mailto:ibilenjkij@mistwireless.com]
> Sent: Thursday, August 09, 2001 1:52 PM
> To: ant-user@jakarta.apache.org
> Subject: How do I remove multiple directories?
>
>
> Hello,
>
> I have a group of directories with names like:
> dirname-0001, dirname-0002,
> etc. that I would like to remove, regardles whether
> they're empty or not. On
> *nix box I would just type rm -rf dirname-* but if I try
> to do this with
> ant, like: <delete file="dirname-*" /> nothing happens.
> Does anybody know
> how do I do this?
>
>
> Thanx
>
>
>
RE: Ant SQL call and double byte charactors
Posted by fanyun <yu...@vtradex.com>.
I think it is a good idea to add an encoding attribute to <sql>. It should solve the problem.
I have also input the bug in bugzilla.
Regards
fanyun
-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Friday, August 10, 2001 7:47 PM
To: ant-user@jakarta.apache.org
Subject: Re: Ant SQL call and double byte charactors
On Fri, 10 Aug 2001, <yu...@vtradex.com> wrote:
> Will this be supported in the coming release or Ant 2 ?
Depends on how it can be supported - I've been thinking of adding an
encoding attribute to <sql> that would then set the encoding for files
the task has to read - whether this will fix your problem is a
different question.
Could you please file this as a bug report in Bugzilla so that we
don't lose track of it?
Stefan
Re: Ant SQL call and double byte charactors
Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 10 Aug 2001, <yu...@vtradex.com> wrote:
> Will this be supported in the coming release or Ant 2 ?
Depends on how it can be supported - I've been thinking of adding an
encoding attribute to <sql> that would then set the encoding for files
the task has to read - whether this will fix your problem is a
different question.
Could you please file this as a bug report in Bugzilla so that we
don't lose track of it?
Stefan
RE: Ant SQL call and double byte charactors
Posted by fanyun <yu...@vtradex.com>.
Will this be supported in the coming release or Ant 2 ?
Regards
fanyun
-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Friday, August 10, 2001 1:45 PM
To: ant-user@jakarta.apache.org
Subject: Re: Ant SQL call and double byte charactors
On Fri, 10 Aug 2001, <yu...@vtradex.com> wrote:
> When I want use ant to execute an sql file which has some chinese
> charactor inside it, I find ant seems can not handle double bytes
> correctly.
I guess this is because Java reads the file with a different encoding.
> Is there any solution?
>
> The sql file its self can be installed correctly using
>
> mysql < a.sql
Falling back to <exec> is all you can do ATM, I'm afraid.
Stefan
Re: Ant SQL call and double byte charactors
Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 10 Aug 2001, <yu...@vtradex.com> wrote:
> When I want use ant to execute an sql file which has some chinese
> charactor inside it, I find ant seems can not handle double bytes
> correctly.
I guess this is because Java reads the file with a different encoding.
> Is there any solution?
>
> The sql file its self can be installed correctly using
>
> mysql < a.sql
Falling back to <exec> is all you can do ATM, I'm afraid.
Stefan
RE: Ant SQL call and double byte charactors
Posted by Brett Knights <br...@knightsofthenet.com>.
Ant uses a FileReader to read your files. A FileReader assumes the default encoding.
If you have this as a general need you might want to look at adding an encoding param to the sql task and patching it to use an
InputStreamReader rather than a FileReader.
HTH
> -----Original Message-----
> From: fanyun [mailto:yun.fan@vtradex.com]
> Sent: Thursday, August 09, 2001 9:12 PM
> To: ant-user@jakarta.apache.org
> Subject: Ant SQL call and double byte charactors
>
>
> Hi all:
>
> I am using ant 1.3. When I want use ant to execute an sql
> file which has some chinese charactor inside it, I find ant
> seems can not handle double bytes correctly. Is there any solution?
>
> The sql file its self can be installed correctly using
>
> mysql < a.sql
>
>
> Regards
>
>
> fanyun
>
> -----Original Message-----
> From: Jason Rogers [mailto:jason.rogers@tumbleweed.com]
> Sent: Friday, August 10, 2001 2:00 AM
> To: 'ant-user@jakarta.apache.org'
> Subject: RE: How do I remove multiple directories?
>
>
> I think you could do the following:
>
> <delete includeEmptyDirs="true" >
> <fileset dir="parent_of_dirname-*" />
> </delete>
>
> If that doesn't work, do an <exec/> on the *nix command.
>
> -Jason
>
> > -----Original Message-----
> > From: Ivan Bilenjkij [mailto:ibilenjkij@mistwireless.com]
> > Sent: Thursday, August 09, 2001 1:52 PM
> > To: ant-user@jakarta.apache.org
> > Subject: How do I remove multiple directories?
> >
> >
> > Hello,
> >
> > I have a group of directories with names like:
> > dirname-0001, dirname-0002,
> > etc. that I would like to remove, regardles whether
> > they're empty or not. On
> > *nix box I would just type rm -rf dirname-* but if I try
> > to do this with
> > ant, like: <delete file="dirname-*" /> nothing happens.
> > Does anybody know
> > how do I do this?
> >
> >
> > Thanx
> >
> >
> >
>
>