harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Deakin <oliver.dea...@googlemail.com>
Subject Re: [classlib][build] Need depends.properties to be in ASCII on non-ASCII platforms
Date Wed, 20 May 2009 15:40:58 GMT
I had a look if there was an svn:encoding property, or if the mime type 
of the file could be set to include an encoding, but unfortunately I 
couldn't get either of these to work (the file was always checked out as 
EBCDIC).

Regards,
Oliver

Sean Qiu wrote:
> I have to say it is a little weird.
>
> Is there any chance that we setting the svn client, tell it checkout
> by desired encoding?
> ASCII in this case.
>
>
> Best Regards
> Sean, Xiao Xia Qiu
>
>
>
>
> 2009/5/20 Oliver Deakin <oliver.deakin@googlemail.com>:
>   
>> Hi all,
>>
>> I have an issue building on z/OS - a fresh checkout from svn gives us
>> depends.properties in the default platform encoding (EBCDIC). However, when
>> we come to load these properties in depends-common.xml, using the
>> loadproperties Ant task, they are assumed to be in ASCII encoding. The
>> "encoding" property of the Ant task does not actually work correctly (I
>> think this is a bug in Ant which I intend to raise) so it is no help. I was
>> wondering if anybody has any ideas about the best way to tackle this
>> problem? Really I'd like to tag the file in some way so that it is checked
>> out of Subversion in the correct encoding immediately, but there does not
>> seem to be a way to do this. I have come up with a few options:
>>
>> 1) Mark the file binary in svn - not a good solution, means losing revision
>> history, not getting proper diffs etc.
>> 2) Use the Ant copy task with it's outputencoding property set to ISO-8859-1
>> to copy the file to another location, and then use that copy to load the
>> properties from. Delete the file after it has been used (patch would be like
>> [1]). Unfortunately this means that when we run the fetch-depends target we
>> see a lot of copy/delete output (setting verbose="false" for these tasks
>> does not seem to hide the output completely).
>> 3) Same as (2), but don't delete the file afterwards. There would only be
>> one initial copy, then no further copies unless the file is modified.
>> However, this does mean that these is an extra file left in the make
>> directory, which I don't like the idea of.
>>
>> I'd choose to go with (2), but thought I'd see if anyone has any other ideas
>> before I commit the change.
>>
>> Regards,
>> Oliver
>>
>>
>> [1]
>> Index: depends-common.xml
>> ===================================================================
>> --- depends-common.xml    (revision 775934)
>> +++ depends-common.xml    (working copy)
>> @@ -25,7 +25,8 @@
>>    where possible.
>>    </description>
>>
>> -    <loadproperties srcfile="${basedir}/make/depends.properties">
>> +    <copy file="${basedir}/make/depends.properties"
>> tofile="${basedir}/make/depends.properties.ascii"
>> outputencoding="ISO-8859-1" />
>> +    <loadproperties srcfile="${basedir}/make/depends.properties.ascii"
>> encoding="ISO-8859-1">
>>      <filterchain>
>>        <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
>>            <param type="token" name="${hy.arch}" value=""/>
>> @@ -34,7 +35,8 @@
>>            <param type="token" name="${hy.platform.variant}" value=""/>
>>        </filterreader>
>>      </filterchain>
>> -    </loadproperties>
>> +    </loadproperties>
>> +    <delete file="${basedir}/make/depends.properties.ascii" />
>>
>>    <macrodef name="download-one-file">
>>        <attribute name="src" />
>>
>> --
>> Oliver Deakin
>> Unless stated otherwise above:
>> IBM United Kingdom Limited - Registered in England and Wales with number
>> 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
>> PO6 3AU
>>
>>
>>     
>
>   

-- 
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Mime
View raw message