You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Raghuveer <ra...@infotechsw.com> on 2008/06/13 09:32:52 UTC

native2ascii in build.xml

How to implement in my ant buil.xml

 

native2ascii -encoding utf-8 d:\t\utf\1.txt d:\t\utf\\2.txt


RE: native2ascii in build.xml

Posted by as2 <ag...@spamcorptastic.com>.
An example how to use the nativ2ascii-ant-task:

    <target name="copy_resources" depends="compile">
       <!-- copies all non-java-files (especially class and
ApplicationResources) to targetdir -->
        <copy todir="${targetdir}">
            <fileset dir="${sourcedir}">
                <exclude name="**/*.java"/>
            </fileset>
        </copy>
    	<!-- This converts the human-readable utf8 into java-readable UTF8 -->
    	<native2ascii encoding="UTF-8" src="${targetdir}" dest="${targetdir}"
    	    	   includes="**/*.properties_src" ext=".properties" />
    	 <delete>
    	    <fileset dir="${targetdir}" includes="**/*.properties_src"/>
    	  </delete>

     </target>

Name your ApplicationResource-files ApplicationResources.properties_src in
your source-directory.

1. properties_src-files get copied to target-directory
2. native2ascii converts them and renames the extension to ".properties"
3. unneeded properties_src are deleted from target-directory


-- 
View this message in context: http://www.nabble.com/native2ascii--in-build.xml-tp17818914p24371730.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: native2ascii in build.xml

Posted by Raghuveer <ra...@infotechsw.com>.
1.	converting the Application resource file in struts by native2ascii
tool,

In this process all polish special characters are converted to Unicode.

 After i enter and save your properties in UTF-8 format, 

 I  then use native2ascii to covert that into ASCII.

 the converted ASCII file will be the resource file read by Java Struts
Framework.

2.	Running ANT for compiling the source and generating war file for
deployment and packing foe sending to customer.

 

 

  _____  

From: Niranjan Deshpande [mailto:niranjan8712@gmail.com] 
Sent: Friday, June 13, 2008 5:11 PM
To: raghuveerv@infotechsw.com
Subject: Re: native2ascii in build.xml

 

please elaborate the two steps properly.

On 6/13/08, Raghuveer <ra...@infotechsw.com> wrote: 

I am working on multilingual JSP Struts application.

I need to convert the polish characters in my "messages.properties" file to
Unicode by native2ascci from command prompt before running ant.

 

Instead of this 2 step process I have planned to make it in single step.

 

Please advice?

 

 

  _____  

From: Niranjan Deshpande [mailto:niranjan8712@gmail.com] 
Sent: Friday, June 13, 2008 3:54 PM
To: Ant Users List; raghuveerv@infotechsw.com
Subject: Re: native2ascii in build.xml

 

I think ant has a seprate task in ant

 

<native2ascii encoding="" src="" dest="" includes=""/>

hth

 

 

On 6/13/08, Raghuveer <ra...@infotechsw.com> wrote: 

How to implement in my ant buil.xml



native2ascii -encoding utf-8 d:\t\utf\1.txt d:\t\utf\\2.txt




-- 
Regards,
Niranjan Deshpande

"Shut yourself from the world and create the reality you want" 




-- 
Regards,
Niranjan Deshpande

"Shut yourself from the world and create the reality you want" 


RE: native2ascii in build.xml

Posted by Raghuveer <ra...@infotechsw.com>.
I am working on multilingual JSP Struts application.

I need to convert the polish characters in my "messages.properties" file to
Unicode by native2ascci from command prompt before running ant.

 

Instead of this 2 step process I have planned to make it in single step.

 

Please advice?

 

 

  _____  

From: Niranjan Deshpande [mailto:niranjan8712@gmail.com] 
Sent: Friday, June 13, 2008 3:54 PM
To: Ant Users List; raghuveerv@infotechsw.com
Subject: Re: native2ascii in build.xml

 

I think ant has a seprate task in ant

 

<native2ascii encoding="" src="" dest="" includes=""/>

hth

 

 

On 6/13/08, Raghuveer <ra...@infotechsw.com> wrote: 

How to implement in my ant buil.xml



native2ascii -encoding utf-8 d:\t\utf\1.txt d:\t\utf\\2.txt




-- 
Regards,
Niranjan Deshpande

"Shut yourself from the world and create the reality you want" 


Re: native2ascii in build.xml

Posted by Niranjan Deshpande <ni...@gmail.com>.
I think ant has a seprate task in ant

<native2ascii encoding="" src="" dest="" includes=""/>

hth


On 6/13/08, Raghuveer <ra...@infotechsw.com> wrote:
>
> How to implement in my ant buil.xml
>
>
>
> native2ascii -encoding utf-8 d:\t\utf\1.txt d:\t\utf\\2.txt
>
>


-- 
Regards,
Niranjan Deshpande

"Shut yourself from the world and create the reality you want"