0

Page not found: because of Cyrillic symbol

asked 2018-05-28 18:27:14 +0800

everdelightedone gravatar image everdelightedone
111 4

updated 2018-05-28 21:18:01 +0800

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?

delete flag offensive retag edit

13 Answers

Sort by » oldest newest most voted
0

answered 2018-06-29 20:47:10 +0800

everdelightedone gravatar image everdelightedone
111 4

Another reason could be is a maven configuration

link publish delete flag offensive edit

Comments

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
1

answered 2018-07-02 10:07:10 +0800

cor3000 gravatar image cor3000
6280 2 7

your 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: image description

If that's not UTF-8 then you can convert your file to UTF-8 with the menu option "convert to utf-8":

image description

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.

link publish delete flag offensive edit
1

answered 2018-07-02 16:16:30 +0800

cor3000 gravatar image cor3000
6280 2 7

instead of double quotes you can use backticks to format source code:

"Env.MAVEN_OPTS=-Dfile.encoding=UTF-8"

vs

Env.MAVEN_OPTS=-Dfile.encoding=UTF-8

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2018-05-28 18:27:14 +0800

Seen: 29 times

Last updated: Jul 02 '18

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More