通过电子邮件标题检测电子邮件正文语言的可能性

发布于 2024-09-24 10:04:05 字数 576 浏览 13 评论 0原文

添加从这里扩展的另一个查询检测电子邮件正文的语言

因为我想确定电子邮件的语言,所以我在我的系统上接收,以便我可以用相同的语言回复发件人。

因此,在电子邮件标头中,有一个这样的标头:

'Content-Type: text/plain; charset=ISO-8859-1'

在确定电子邮件正文的语言方面可以证明有多好?

例如(从 gmail 中取出的所有标头):

  1. 用于中文主题和正文 'Content-Type: text/plain; charset=GB2312'

  2. 韩语主题和正文 'Content-Type: text/plain; charset=EUC-KR'

  3. 用于法语/意大利语主题和正文 'Content-Type: text/html; charset=ISO-8859-1'

另外,是否有人可以指导我列出为语言到字符集定义的映射?

预先感

谢阿什什

Adding on one more query extending from here Detecting language of email body:

Since I want to determine the language of the email that I receive on my system, so that I can reply to the sender in same language.

So in the email headers there is one header of the kind:

'Content-Type: text/plain; charset=ISO-8859-1'

How good it can prove in determining the language of the email body?

e.g (all headers taken out from gmail):

  1. for Chinese subject and body 'Content-Type: text/plain; charset=GB2312'

  2. for Korean subject and body 'Content-Type: text/plain; charset=EUC-KR'

  3. for french/italian subject and body 'Content-Type: text/html; charset=ISO-8859-1'

Also is there any list somebody can direct me that have mappings defined for language to charset?

thanks in advance

Ashish

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╰ゝ天使的微笑 2024-10-01 10:04:05

这是必需的列表

我建议您使用 google api来检测语言。按照此处的建议

Here is the required list

I would suggest you to go for google api to detect language. as suggested here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文