ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject RE: SQL task output encoding
Date Thu, 04 May 2006 14:51:44 GMT
See the following:
http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#cha
renc

"The default encoding is determined during virtual-machine startup and
typically depends upon the locale and encoding being used by the
underlying operating system."

You can use -Dfile.encoding=xxx on the command line to force the default
encoding, if required.

Hope this helps
Keith


-----Original Message-----
From: Patrick Martin [mailto:antuser@gmail.com] 
Sent: 04 May 2006 15:41
To: Ant User
Subject: Re: SQL task output encoding


I might be wrong on this:
>>>>> Java Reader and Writer always use Unicode by default

On 5/4/06, Patrick Martin <antuser@gmail.com> wrote:
> Hello,
>
> I'd like to know which encoding is used by the SQL task when outputing

> to a file. I believe it is unicode but I need to be sure...
>
> <sql> has an encoding attribute, but it is used when loading the 
> script to run.
>
> Reading the code, it seems that the output encoding cannot be set via 
> ant. Here is how the output is set: out = new PrintStream(new 
> BufferedOutputStream(
>                      new FileOutputStream(output.getAbsolutePath(), 
> append)));
>
> This would mean that is uses the JVM default. On an other hand I read 
> somewhere that Java Reader and Writer always use Unicode by default. 
> And if I am not mistaking, the <sql> task uses a PrintStream which in 
> turn uses a Writer... Does this certify that the output will be 
> unicode?
>
> Thanks,
>
> Patrick Martin
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message