I appreciate your reply. Actually it is easy to duplicate. Create a test bean
with my entry value in resource xml file, deploy it to tomcat and then in
your tomcat web folder check if your characters are changed. One entry with
value is fine, but the other blows up. Not sure why. Even I don't go deploy
and copy resource xml file manually into tomcat web folder, I still have the
same exception (Invalid byte 2 of 3-byte UTF-8 sequence). How to check
unicode encoding in resource file itself? I am using Eclipse 3.3 with
setting of unicode for text so I can see and type in Chinese.



mraible wrote:
> 
> I wish I had an answer for you, but I don't. I've never tried to use
> Chinese characters as text values in my Spring XML files.
> 
> Matt
> 
> On 8/8/07, kkus <[EMAIL PROTECTED]> wrote:
>>
>> Env. is 1.9.4 Spring+Hibernate, XP SP2 and JDK5 Update 11. Chinese
>> characters
>> in that file became monster characters after related build target was
>> implemented in some cases.
>>
>> For example, "<entry key="getAlarmHist"><value>报警历史记录</value></entry>" in
>> that xml file will lead to all Chinese monster characters. Log file
>> showed,
>>
>> [appfuse] ERROR [main] ContextLoader.initWebApplicationContext(205) |
>> Context initialization failed
>> org.springframework.beans.factory.BeanDefinitionStoreException: Line 59
>> in
>> XML document from ServletContext resource
>> [/WEB-INF/applicationContext-resources.xml] is invalid; nested exception
>> is
>> org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.
>> Caused by:
>> org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.
>>         at
>> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>>
>>
>> But "<entry key="getAlarmHist"><value>记录</value></entry>" works fine, no
>> error in log file at all.
>>
>> Following is related build target,
>>
>> <target name="copy-web-files" depends="prepare" description="Copy static
>> files">
>> ....
>> <copy todir="${webapp.target}/WEB-INF">
>>             <fileset dir="${basedir}/web">
>>                 <include name="pages/**/*.jsp"/>
>>             </fileset>
>>             <fileset dir="${spring.dir}" includes="*.xml"/>
>>             <fileset dir="${basedir}/web/WEB-INF"
>> includes="**/*-resources.xml"/>
>>             <filterset refid="db.variables"/>
>>         </copy>
>> .....
>> </target>
>>
>> How come I have different results? How to debug or find this unicode
>> issue?
>> Thanks!
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Unicode-problem-in-applicationContext-resources.xml-tf4240526s2369.html#a12066172
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> http://raibledesigns.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unicode-problem-in-applicationContext-resources.xml-tf4240526s2369.html#a12073528
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to