0
votes

I want to use ant to build my web project and copy it onto the server through scp.

The build is seperated into three steps:

  1. Collect data
  2. Copy collected data through scp
  3. Clean

The problem is that step 2 somehow corrupts my utf-8 files (I get that great "headers already sent by" error-message).

If I skip step 2 and 3 and copy the collected files by myself using WinSCP everything works fine. That means: The ant copy command works as it should.

What does not work correctly is the ant scp command:

<scp todir="${remote_user}:${remote_password}@${remote_host}:${remote_basepath}/core" trust="true" failonerror="yes">
    <fileset dir="${build_root}/core/">
        <include name="${core_src}/" />
    </fileset>
</scp>

I am working with Windows 7 and Eclipse 4.3 (Kepler) with the built in ant plugin.

What I tried so far: - Setting encoding and outputencoding attribute while copying - Setting -Dfile.encoding=UTF8 in my build config on JRE Tab - Tried jre7 but then I run into a Keberus Error. So still using jre6

I hope someone can help me :)

1

1 Answers

0
votes

Solved it.

I worked way too long with windows-1252 to have missed that: UTF-8 with BOM = NOT GOOD

All my files had that BOM. Ant did everything right. WinScp removed the BOM