You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jan_bar <he...@yahoo.com> on 2006/11/27 15:44:24 UTC

maven filter and UTF-8

Hi,

It seems to me that maven 2.0.4 filter corrupts UTF-8 files. I have a XML
file with UTF-8 encoding that doesn't contain any replacement strings, but
it is filtered. The resulting file is not the same as source file, UTF-8
characters are wrong. Why maven modifies the file? I suspect, that the
filter also changes encoding.
I am on Windows 2000 and default encoding for Java seems to be cp1250.

Jan




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven filter and UTF-8

Posted by Andrius Ĺ abanas <an...@pivotcapital.com>.
jan_bar wrote:
> Hi,
> 
> It seems to me that maven 2.0.4 filter corrupts UTF-8 files. I have a XML
> file with UTF-8 encoding that doesn't contain any replacement strings, but
> it is filtered. The resulting file is not the same as source file, UTF-8
> characters are wrong. Why maven modifies the file? I suspect, that the
> filter also changes encoding.
> I am on Windows 2000 and default encoding for Java seems to be cp1250.
> 
> Jan

You need to specify the encoding for resources plugin. Unfiltered files 
are copied as-is, but filtering sets the encoding to platform default, 
if unspecified. Check out this link for example configuration:
http://maven.apache.org/plugins/maven-resources-plugin/examples/encoding.html


cheers,

Andrius

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org