SafeExamBrowser / seb-server

The Safe Exam Browser Server web application simplifies and centralizes the configuration of SEB clients for exams. It interacts with a learning management or exam system for setting up and conducting e-assessments with Safe Exam Browser. It also improves security by allowing to monitor connected SEB clients in real time during e-assessments.
Mozilla Public License 2.0
43 stars 38 forks source link

Interface CJK characters garbled #26

Closed fishfree closed 1 year ago

fishfree commented 3 years ago

I directly edit the messages_en.properties to replace with some Chinese characters as below: `################################

Login Page

################################

sebserver.login.username=用户名 sebserver.login.pwd=密码 sebserver.login.login=登录 ` Unfortunately, the interface characters become garbled as below: image

I verified that the encodings of webpages and messages_en.properties are both in UTF-8. Then what's wrong?

anhefti commented 3 years ago

Hi, please read the first answer on this stack-overflow questions that targets your problem: https://stackoverflow.com/questions/9559447/not-rendering-chinese-characters-on-in-spring-mvc

fishfree commented 3 years ago

@anhefti Thank you. The problem solved.

fishfree commented 1 year ago

Hi, please read the first answer on this stack-overflow questions that targets your problem: https://stackoverflow.com/questions/9559447/not-rendering-chinese-characters-on-in-spring-mvc

@anhefti I'm trying seb-server 1.5 today, and I've encoded the msessages_zh.properties as the link, and put it under config/spring/messages folder. It become garbeld again, which was working in 1.1 & 1.2 I tried 2 years ago.

anhefti commented 1 year ago

Hi, since SEB Server 1.2 nothing has changed within the internationalization handling of SEB Server. So with this few information you give here, I cannot see what's the cause of the problem. I hardly think it has something to do with the new version but with the setup. Maybe SEB Server doesn't load the massages properly or the old one? You can also have a look at the logs at startup, there it should be shown what messages are loaded. But the format and handling of the messages itself is still the same.

fishfree commented 1 year ago

@anhefti Attached is a part of my translated messages_zh.properties file in ASCII encoding ( I also tried UTF-8 encoding). messages_zh.zip

And in docker logs seb-server, it shows: 07:05:19.666 INFO [main]:[ch.ethz.seb.sebserver.gui.RAPSpringConfig] +++ Register external messages resources from: file:/sebserver/config/spring/messages