maven is well documented: here a related setting https://maven.apache.org/plugins/maven-resources-plugin/examples/encoding.html
cor3000 ( 2018-07-02 10:08:35 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello everybody!
I got a legacy project (2016 year) with zul-pages. The problem is some pages issue "Page not found" with
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 2-byte UTF-8 sequence
(...stack trace follows).
I found out that problem arises only on pages with "И" symbol (Cyrillic Capital Letter I, unicode code is U+0418). So, if I replace "И" with & # x0418;
(without spaces) on .zul page - it works. It looks strange because all other Cyrillic symbols are working without any problems.
Zk version is 7.0.3,
Tomcat version 8.0.27, OS Windows 10 1803 build 17134.48 with russian locale.
Every zul-page has <?xml version="1.0" encoding="UTF-8"?>
as a first line.
Is it a ZK framework bug?
Another reason could be is a maven configuration
maven is well documented: here a related setting https://maven.apache.org/plugins/maven-resources-plugin/examples/encoding.html
cor3000 ( 2018-07-02 10:08:35 +0800 )edityour recent stack looks unrelated to index.zul
:
WARNING: Unable to load ...\central-admin-2.4.8-SNAPSHOT\zk\report\eventLog.zul
If you think it's a Netbeans problem I'd suggest to build/run the application from command line. Then you can identify or rule out Netbeans as the source.
A common command to build the war file is to execute ...
> mvn clean package
.. and the war file should be the target folder.
You also made a few vague statements:
So page has windows-1251 encoding for some reason ... I opened problem .zul with Notepad++ and it looked OK.
What does Notepad++ say about the character encoding? Can you try converting it to UTF-8?
The file encoding Notepad++ detected (it doesn't care about the XML prolog) is shown at the bottom right:
If that's not UTF-8 then you can convert your file to UTF-8 with the menu option "convert to utf-8":
Then save the file again.
If you think it's a maven settings issue then please compare the source and target files. In any case you need to first be certain about your file encodings. No tool can 100% help you if you don't know which file encoding your text files have or should have.
Asked: 2018-05-28 18:27:14 +0800
Seen: 29 times
Last updated: Jul 02 '18