Answer the question
In order to leave comments, you need to log in
How to set up the correct recording and display of Cyrillic in the browser (Mysql 5.5.46)?
Learned to cook: Spring 3 MVC + Spring Security + Hibernate from habrahabr.ru/post/111102/. The server started, but when adding records through the page localhost:8080/contactmanager/index I see kazibuki.
Output SHOW VARIABLES LIKE 'char%' :
Via phpMyAdmin Insert works fine
But in localhost:8080/contactmanager/index I see the following:
And if I add this entry I get the
following:
In my.cnf added:
[mysqld]
character-set-server= utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
Contents of jdbc.properties:
jdbc.driverClassName= com.mysql.jdbc.Driver
jdbc.dialect=org.hibernate.dialect.MySQLDialect
jdbc.databaseurl=jdbc:mysql://localhost:3306/contactmanager?characterEncoding=UTF-8
jdbc.username=contactmanager
jdbc.password=1234
Made changes to contact.jsp. Got this result - view-source: localhost:8080/contactmanager/index:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Менеджер контактов</title>
</head>
<body>
<a href="/contactmanager/logout">
Выйти из приложения
</a>
<h2>Менеджер контактов</h2>
<form id="contact" action="add" method="post">
<table>
<tr>
<td><label for="firstname">
Имя
</label></td>
<td><input id="firstname" name="firstname" type="text" value=""/></td>
</tr>
<tr>
<td><label for="lastname">
Фамилия
</label></td>
<td><input id="lastname" name="lastname" type="text" value=""/></td>
</tr>
<tr>
<td><label for="email">
Email
</label></td>
<td><input id="email" name="email" type="text" value=""/></td>
</tr>
<tr>
<td><label for="telephone">
Телефон
</label></td>
<td><input id="telephone" name="telephone" type="text" value=""/></td>
</tr>
<tr>
<td colspan="2"><input type="submit"
value="Добавить контакт" /></td>
</tr>
</table>
</form>
<h3>Контакты</h3>
<table class="data">
<tr>
<th>Имя</th>
<th>Email</th>
<th>Телефон</th>
<th> </th>
</tr>
<tr>
<td>, Вася</td>
<td></td>
<td></td>
<td><a href="delete/1">Удалить</a></td>
</tr>
<tr>
<td>, ÐаÑилий</td>
<td></td>
<td></td>
<td><a href="delete/2">Удалить</a></td>
</tr>
</table>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question