You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2008/07/28 23:50:50 UTC
DO NOT REPLY [Bug 45495] New: Ant showing garbage I18N characters
when option "-propertyfile" is used.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45495
Summary: Ant showing garbage I18N characters when option "-
propertyfile" is used.
Product: Ant
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P3
Component: Core
AssignedTo: notifications@ant.apache.org
ReportedBy: yunpeng.zhang@sun.com
Sample testing Ant script:
<project>
<target name="echo">
<echo message="The input is: ${input}"/>
</target>
</project>
Sample testing input property file:
input=部件名
The issue is found in both 1.7.1 and 1.6.5.
The problem:
1. If we put "input=部件名" in a property file and invoke ant using
"-propertyfile" option, we got garbage output, please see the following:
.\ant -f input.xml -propertyfile test.txt echo
Buildfile: input.xml
echo:
[echo] The input is: ??????
BUILD SUCCESSFUL
Total time: 0 seconds
2. If we give the input ("input=部件名") directly from the ant command line,
everything just went fine, please see the following:
.\ant -f input.xml -Dinput=部件名 echo
Buildfile: input.xml
echo:
[echo] The input is: 部件名
BUILD SUCCESSFUL
Total time: 0 seconds
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45495] Ant showing garbage I18N characters when
option "-propertyfile" is used.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45495
Yunpeng Zhang <yu...@sun.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |INVALID
--- Comment #2 from Yunpeng Zhang <yu...@sun.com> 2008-07-29 19:19:07 PST ---
Hi Steve
Thanks for the info, it seems I do not have this knowledge.
After I converted "部件名" (native) to "\u90e8\u4ef6\u540d" (ASCII) in my
Ant property file using native2ascii, JBI Ant starts to work fine for me,
please see the following:
dmin.xml:1059: 服务引擎列出失败。 [
ERROR:(UICMN2827)目标无效: 部件名. <--- it was ????? before. Pretend
that "部件名" is the target.
]
I think it is working fine for me now, I am going to close it.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45495] Ant showing garbage I18N characters when
option "
-propertyfile" is used.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45495
Steve Loughran <st...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Steve Loughran <st...@apache.org> 2008-07-29 03:54:23 PST ---
Does your property file conform to that of the java.util.Properties
specification?
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html
Specifically the bit about encoding?
"This format uses the ISO 8859-1 character encoding. Characters that cannot be
directly represented in this encoding can be written using Unicode escapes ;
only a single 'u' character is allowed in an escape sequence. The native2ascii
tool can be used to convert property files to and from other character
encodings."
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.