I use SS.Users stored in mysql database. Database and Column charset is UTF-8 When i want give username for current login user in JSP page i write:
< security:authentication property=”principal.username”/ >
if username on english – all right, i get it username
but if username writen in russian language,for example “новый_пользователь”, i get in page source code ” & # 1085;& #1086;& #1074;& #1099;& #1081;& #95;& #1087;& #1086;& #1083;& #1100;& #1079;& #1086;& #1074;& #1072;& #1090;& #1077;& #1083;& #1100;”
how to fix it?
Thank you for your answers.
In my web.xml i have filter:
<filter>
<filter-name>charsetFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
The authentication tag escapes the contents by default to reduce the risk of injection attacks. Try it with: