here is a simple plugin for add CJK charset allowed as username or group name.
Allow Chinese、Japanese、Korean as username or group name.
use Pinyin or Romaji first letter as default avatar for Chinese, Hiragana and Katakana username.
hooks: after_code: - exec: cd: $home/plugins cmd: - git clone https://github.com/discourse/docker_manager.git - git clone https://github.com/zh99998/discourse-username-localization.git - bash discourse-username-localization/install.sh
CJK Unified Ideographs blocks 4E00-9FD5
CJK Unified Ideographs Extension A 3400-4DBF
CJK Unified Ideographs Extension B 20000-2A6DF
CJK Unified Ideographs Extension C 2A700-2B73F
CJK Unified Ideographs Extension D 2B740–2B81F
CJK Unified Ideographs Extension E 2B820–2CEAF
CJK Compatibility Ideographs F900–FAFF
CJK Compatibility Ideographs Supplement 2F800-2FA1D
Hangul Syllables AC00–D7AF
Katakana Phonetic Extensions 31F0–31FF
Kana Supplement 1B000–1B0FF
- Pinyin/Romaji support is hacky, and not support Korean. other characters will make a avatar with “_” (I’d like to use “#” for unknown characters avatar, but don’t know how to do that)
- Unicode homograph attack UTS #39: Unicode Security Mechanisms
- not well-tested. I only tested in my site.
please make a pull request if you can get them better.