ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45530] ANT incorrectly copies env.variables with non-latin text
Date Wed, 27 Jul 2011 06:38:57 GMT changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #3 from 2011-07-27 06:38:57 UTC ---
it appears to work a bit better under linux..

with a few mods to eth build..

<?xml version="1.0" encoding="UTF-8" ?>
<project name="bug45530">
        <property environment="env" />

 <target name="test-linux" >
        <exec executable="env"  osfamily="unix" 
            newenvironment="true" searchpath="true" failonerror="true">
            <env key="RUSSIAN" value="${env.RUSSIAN}"/>


we get....

$> uname -a
Linux 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64
x86_64 x86_64 GNU/Linux

$> ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010

$>  $SHELL -version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

$> export RUSSIAN=`echo -e "\xc3\x90\xc3\x92\xc3\x91\xc3\x88"`

$> echo $RUSSIAN

$> ant test-linux
Buildfile: build.xml

     [exec] RUSSIAN=ÐÒÑÈ

Total time: 0 seconds

and a plain java program works also

import java.util.*;
class bug45530
        public static void main(String[] args)
                Map<String,String> envs = System.getenv();

both of which fail on my  win XP

i was able to set the winxp env variable with a simple
set CRAP=Тимофей

or by setting it in the SystemProperties->Advanced->Environment variables area

my conclusion.. it is a defect with the java implementation of System.getenv

C:\>java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
View raw message