You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Patrick Martin <an...@gmail.com> on 2006/05/04 16:27:49 UTC

SQL task output encoding

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


Re: SQL task output encoding

Posted by Patrick Martin <an...@gmail.com>.
I might be wrong on this:
>>>>> Java Reader and Writer always use Unicode by default

On 5/4/06, Patrick Martin <an...@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