从右到左的电子邮件 [英] Right-to-Left Email

查看:12
本文介绍了从右到左的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从我的代码生成电子邮件,以便使用从右到左阅读的语言(例如阿拉伯语)的人可以正确阅读.我的问题是:实现这一目标我有哪些选择?

I'm trying to generate email from my code that will read correctly for people using right-to-left-reading languages such as Arabic. My question is: what are my options for acheiving this?

我知道我可以创建多部分电子邮件并将邮件正文编码为text/html",然后在 <html> 标签中指定文本方向(例如 <html dir="rtl">),但理想情况下,我希望使用纯文本电子邮件,而不必依赖 HTML 格式,因为并非所有用户的电子邮件客户端都支持 HTML.

I am aware that I can create a multipart email and encode the message body as "text/html", then specify a text direction in the <html> tag (e.g. <html dir="rtl">), but ideally I would like use plain-text email and not have to rely on HTML formatting, because not all users will have HTML support in their email client.

在纯文本方面,我设法使用Content-Type"标头以 UTF-8 编码阿拉伯文本,如下所示:

On the plain-text front, I have managed to encode Arabic text in UTF-8 using the "Content-Type" header as follows:

Content-Type: text/plain;charset=UTF-8

但至于文本的整体方向,我不确定如何在电子邮件中明确指定这一点,或者即使这是必要的.阿拉伯语演讲者通常如何处理纯文本电子邮件?他们通常会依赖电子邮件客户端中的全局文本方向设置,还是有其他一些普遍接受的方式来强制电子邮件本身的文本方向?

But as for the overall direction of the text, I am unsure how to explicitly specify this in the email, or even if this is necessary. How would an Arabic speaker typically work with plain-text email? Would they usually rely on the global text direction setting in their email client, or is there some other, generally accepted way of forcing the text direction in the email itself?

对于从右到左电子邮件的任何建议或一般建议,我们将不胜感激.

Any suggestions or general advice regarding right-to-left email would be much appreciated.

推荐答案

我不确定如何在电子邮件中明确指定这一点,或者即使这是必要的.

I am unsure how to explicitly specify this in the email, or even if this is necessary.

对于纯文本 unicode,您可以添加 从右到左标记 内联,但并不是真的需要.

For plain-text unicode, you can add a right-to left mark inline, but it's not really needed.

我想说为什么不添加 RTL 标记,但这并不是必需的

阿拉伯语演讲者通常如何处理纯文本电子邮件?他们通常会依赖电子邮件客户端中的全局文本方向设置,还是有其他一些普遍接受的方式来强制电子邮件本身的文本方向?

How would an Arabic speaker typically work with plain-text email?Would they usually rely on the global text direction setting in their email client, or is there some other, generally accepted way of forcing the text direction in the email itself?

大多数用户将能够切换文本方向以获得正确的行填充,或者习惯于锯齿状的阿拉伯语文本(如果文本本身不包含任何内嵌英文字符,则它会正确显示), 用户习惯于分块阅读,即使是这样).

Most users would be able to either switch the text direction to get a correct padding of the lines, or are used to a jagged-right Arabic text (the text itself will appear correctly if it doesn't contain any inline English characters, and users are used to reading it in chunks even if it does).

这篇关于从右到左的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆