aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/resources/schema-mysql.sql2
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/resources/schema-mysql.sql b/src/main/resources/schema-mysql.sql
index 5b22bb35..0f6321fd 100644
--- a/src/main/resources/schema-mysql.sql
+++ b/src/main/resources/schema-mysql.sql
@@ -514,7 +514,7 @@ DROP TABLE IF EXISTS `tags`;
CREATE TABLE `tags` (
`tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`synonym_id` int(10) unsigned DEFAULT NULL,
- `name` char(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+ `name` char(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
`notop` tinyint(1) unsigned NOT NULL DEFAULT 0,
`noindex` tinyint(1) unsigned NOT NULL DEFAULT 0,
`stat_messages` int(10) unsigned NOT NULL DEFAULT 0,
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 4cbc30b5..3c37e846 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -2640,4 +2640,12 @@ public class ServerTests {
msg = messagesService.getMessage(freefd.getUid(), mid).orElseThrow();
assertThat(msg.isSubscribed(), is(false));
}
+ @Test
+ @Transactional
+ public void emojisShouldCollateCorrectly() {
+ var first = "\uD83E\uDD84";
+ var second = "\uD83E\uDD5C";
+ assertThat(tagService.getTag(first, true).getName(), is(first));
+ assertThat(tagService.getTag(second, true).getName(), is(second));
+ }
}