# Unicode用户名和群组名称

**URL:** https://meta.discourse.org/t/unicode-usernames-and-group-names/117737
**Category:** Announcements
**Tags:** new-feature
**Created:** [2019年五月14日 20:18 UTC](https://meta.discourse.org/t/unicode-usernames-and-group-names/117737 "2019-05-14T20:18:48Z")
**Posts on this page:** 1
**Showing post:** 18

<div class="post-metadata">

### Author: ![mentalstring](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mentalstring/32/168934_2.png) [@mentalstring](https://meta.discourse.org/u/mentalstring)
#### Post date: [2020年一月29日 14:08 UTC](https://meta.discourse.org/t/unicode-usernames-and-group-names/117737/18 "2020-01-29T14:08:08Z")

</div>

我很高兴看到对 Unicode 用户名和群组名称的支持 👍。

然而，随着对 Unicode 用户名支持的引入，现在出现了一个有点奇怪的情况：Discourse 可以支持像 `中国` 或 `ไทย` 这样的用户名，但却不支持 `-dashing-`，因为它 [仍然要求](https://github.com/discourse/discourse/blob/master/app/models/username_validator.rb) 首尾字符必须是字母、数字或下划线（但不能是连字符）。

我尝试通过 Unicode 支持设置来添加对连字符的支持，但似乎没有生效，尽管我可能遗漏了某些步骤。

既然已经支持了 Unicode，是否有必要重新审视关于首尾字符不允许使用连字符的规则？是否有理由继续禁止在首尾位置使用连字符，却允许任何非 ASCII 字母（包括下划线）？连字符在 URL 中似乎不需要特殊编码，但也许还有其他原因？

我知道这有点偏离主题，如果需要的话，请告诉我是否应该另开一个话题讨论。

---

_[View the full topic](https://meta.discourse.org/t/unicode-usernames-and-group-names/117737)._
