Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

全角符号被转译为 [emoji=xxx] 格式 #90

Open
inused opened this issue May 8, 2024 · 2 comments
Open

全角符号被转译为 [emoji=xxx] 格式 #90

inused opened this issue May 8, 2024 · 2 comments

Comments

@inused
Copy link

inused commented May 8, 2024

如下图所示,其中 [emoji=ff1a] 原始字符是全角冒号,另外全角句号 会被转义为 [emoji=3002] 等等
image

daen 框架的httpapi.go 文件中有以下逻辑,
对go语音不太了解,看函数名猜测,如果是汉字或者字母则直接写入,如果不是则根据占据的字节数量判断是UTF8还是UTF16再被改为[emoji=xxx]格式。
测试了几个日文、韩文、阿拉伯文也是可以正常输出的。

vlm 框架下也有类似逻辑,只测试了 daen 框架。

请问这个逻辑存在的意义是什么,是否可以去除?
微信中对于 emoji 图标也是使用 /敲打 [翻白眼] [Sweats] 这种形式的,未使用unicode编码格式

image

@JimiZhou
Copy link

JimiZhou commented Jun 6, 2024

同样遇到了这个问题

@inused
Copy link
Author

inused commented Jun 11, 2024

同样遇到了这个问题

我是把下面转换的逻辑都删掉了,目前为止还没有问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants