turms-im / turms

🕊️ The world's most advanced open source instant messaging engine for 100K~10M concurrent users https://turms-im.github.io/docs
Apache License 2.0
1.74k stars 269 forks source link

Support recognizing all characters in Unicode 15.0 #1133

Open JamesChenX opened 1 year ago

JamesChenX commented 1 year ago

Movitation

Currently, the anti-spam plugin uses Java char to support the characters from 0~65535. To support more characters (149,186 characters in Unicode 15.0), we need to replace char with int.

But we set this issue pending for now until we really need to support more characters.

Valhalla

btw, we can define a primitive class wchar to represent a 3-byte wide UTF-8 character when the features under Valahall are delivered, and it's more efficient than int.

primitive class wchar {
    private byte b1;
    private byte b2;
    private byte b3;
}