更新时间:2023-09-11 20:57:16
" Jed" < je **** @ newsgroups.nospamwrote in message
news:B0 ************************** ******** @ microsof t.com ...
"Jed" <je****@newsgroups.nospamwrote in message
news:B0**********************************@microsof t.com...
我有一个需要处理带有
的国际字符的表单
I have a form that needs to handle international characters withing the
UTF-8
UTF-8
字符集。我已经尝试了所有推荐的策略来获得
character set. I have tried all the recommended strategies for getting
utf-8
utf-8
从表格输入到电子邮件的字符消息,我无法让它工作。
characters from form input to email message and I cannot get it to work.
I
需要与经典的asp保持一致。
以下是我尝试的一些事情:
''CDONTS
致电msg.SetLocaleIDs(65001)
''CDOSYS
msg.HTMLBodyPart.Charset =" utf-8"
我在电子邮件HTML中包含以下元标记:
< meta http-equiv =" Content-Type"含量=" text / html的; charset = utf-8">
我也尝试修改所有涉及的请求
need to stay with classic asp for this.
Here are some things I tried:
''CDONTS
Call msg.SetLocaleIDs(65001)
''CDOSYS
msg.HTMLBodyPart.Charset = "utf-8"
I included the following meta tag in the email HTML:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
I also tried modifying the CharSet and CodePage of all involved Request
和$的CharSet和CodePage b $ b
and
回应。
我能够将回复的表格内容写回屏幕
Responses.
I was able to Response.Write the form content on post back to the screen
和
and
它已正确呈现。但是,我的努力都不能通过正确的代码库获得电子邮件
it was properly rendered. However, none of my efforts can get the email
到
to
render。我试过在
中打开电子邮件
render with the correct codebase. I have tried opening the email in
Outlook
Outlook
和Thunderbird。两个人都没有选择UTF-8字符集元标记。
任何帮助或教程链接都会有所帮助。
and Thunderbird. Neither one picks up on the UTF-8 charset meta tag.
Any help or link to tutorial would help so much.
在邮件中混合字符集是一个真正的雷区。在写完
任何内容之前先试试这个消息: -
oMsg.BodyPart.charset =" UTF-8"
>
其中oMsg是CDOSYS消息对象(不推荐使用CDONTS,不要写新的
代码)。
这将使所有文字部分都使用UTF-8编码。
Anthony。
Mixing charsets in a message is a real mine field. Try this before writing
any content to the message:-
oMsg.BodyPart.charset = "UTF-8"
Where oMsg is a CDOSYS message object (CDONTS is deprecated don''t write new
code against it).
That will make all text parts use UTF-8 encoding.
Anthony.
嘿,安东尼,
感谢您的建议。我对它的潜力持乐观态度,但它似乎没有什么区别。
这是我的代码:
msg.BodyFormat = 0''将正文设置为HTML = 0 TEXT = 1
msg.MailFormat = 0''将格式设置为MIME = 0 TEXT = 1
''调用msg.SetLocaleIDs(65001)
msg.Body =消息
msg.Send
''尝试将内容写入浏览器查看字符串是否坏
Response.Clear
''Response.CodePage = 65001
Response.CharSet =" utf- 8
Response.Write消息
Response.End
基本上如果我发布一些像?o [u with一个重音标记]它会在浏览器中渲染好b $ b,但是电子邮件会显示为??? o [A with tilde
over it,后面跟一个上标o]我认为这是ANSII的等价物
或者什么。
我读过绝对最低每个软件开发人员Abs olutely,
肯定必须知道Unicode和字符集(没有借口!)"
[ http://www.joelonsoftware.com/articles/Unicode.html] 但它似乎没有
可以解释为什么这不起作用。
嗯..
Anthony Jones写道:
Hey, Anthony,
Thanks for the suggestion. I was optimistic about its potential, but it
doesn''t seem to make a difference.
Here is my code:
msg.BodyFormat = 0 ''Set body text to HTML=0 TEXT=1
msg.MailFormat = 0 ''Set format to MIME=0 TEXT=1
''Call msg.SetLocaleIDs(65001)
msg.Body = Message
msg.Send
''Try writing the contents to the browser to see if the string is bad
Response.Clear
''Response.CodePage = 65001
Response.CharSet = "utf-8"
Response.Write Message
Response.End
Basically if I post some a character like ?o [u with an accent mark] it will
render fine in the browser, but the email it will appear as ???o [A with tilde
over it, followed by a superscript o] I think that is the ANSII equivalent
or something.
I have read "The Absolute Minimum Every Software Developer Absolutely,
Positively Must Know About Unicode and Character Sets (No Excuses!)"
[http://www.joelonsoftware.com/articles/Unicode.html] but it doesn''t seemed
to shed any light on why this isn''t working.
Hmm..
"Anthony Jones" wrote:
在邮件中混合字符集是一个真正的雷区。在写完
任何内容之前先试试这个消息: -
oMsg.BodyPart.charset =" UTF-8"
>
其中oMsg是CDOSYS消息对象(不推荐使用CDONTS,不要写新的
代码)。
这将使所有文本部分都使用UTF-8编码。
Anthony。
Mixing charsets in a message is a real mine field. Try this before writing
any content to the message:-
oMsg.BodyPart.charset = "UTF-8"
Where oMsg is a CDOSYS message object (CDONTS is deprecated don''t write new
code against it).
That will make all text parts use UTF-8 encoding.
Anthony.
实际上,这是我试过的CDOSYS代码。
msg.BodyPart.Charset =" utf-8"
msg.HTMLBody =消息
msg.HTMLBodyPart.Charset =" utf-8"
msg.Send
我在上一篇文章中意外复制了CDONTS代码。
Jed写道:
Actually, this is the CDOSYS code I tried.
msg.BodyPart.Charset = "utf-8"
msg.HTMLBody = Message
msg.HTMLBodyPart.Charset = "utf-8"
msg.Send
I accidentally copied the CDONTS code in the last post.
"Jed" wrote:
嘿,安东尼,
这是我的代码:
msg.BodyFormat = 0''将正文设置为HTML = 0 TEXT = 1
msg.MailFormat = 0''将格式设置为MIME = 0 TEXT = 1
''调用msg.SetLocaleIDs(65001)
msg.Body =消息
msg.Send
''尝试将内容写入浏览器查看字符串是否坏
Response.Clear
''Response.CodePage = 65001
Response.CharSet =" utf- 8
Response.Write消息
Response.End
基本上如果我发布一些像?o [u with一个重音标记]它会在浏览器中渲染好b $ b,但是电子邮件会显示为??? o [A with tilde
over it,后面跟一个上标o]我认为这是ANSII的等价物
或者什么。
我读过绝对最低每个软件开发人员A bsolutely,
肯定必须知道Unicode和字符集(没有借口!)"
[ http://www.joelonsoftware.com/articles/Unicode.html] 但它似乎没有
可以解释为什么这不起作用。
嗯..
Anthony Jones写道:
Hey, Anthony,
Thanks for the suggestion. I was optimistic about its potential, but it
doesn''t seem to make a difference.
Here is my code:
msg.BodyFormat = 0 ''Set body text to HTML=0 TEXT=1
msg.MailFormat = 0 ''Set format to MIME=0 TEXT=1
''Call msg.SetLocaleIDs(65001)
msg.Body = Message
msg.Send
''Try writing the contents to the browser to see if the string is bad
Response.Clear
''Response.CodePage = 65001
Response.CharSet = "utf-8"
Response.Write Message
Response.End
Basically if I post some a character like ?o [u with an accent mark] it will
render fine in the browser, but the email it will appear as ???o [A with tilde
over it, followed by a superscript o] I think that is the ANSII equivalent
or something.
I have read "The Absolute Minimum Every Software Developer Absolutely,
Positively Must Know About Unicode and Character Sets (No Excuses!)"
[http://www.joelonsoftware.com/articles/Unicode.html] but it doesn''t seemed
to shed any light on why this isn''t working.
Hmm..
"Anthony Jones" wrote:
在邮件中混合字符集是一个真正的雷区。在写完
任何内容之前先试试这个消息: -
oMsg.BodyPart.charset =" UTF-8"
>
其中oMsg是CDOSYS消息对象(不推荐使用CDONTS,不要写新的
代码)。
这将使所有文本部分都使用UTF-8编码。
Anthony。
Mixing charsets in a message is a real mine field. Try this before writing
any content to the message:-
oMsg.BodyPart.charset = "UTF-8"
Where oMsg is a CDOSYS message object (CDONTS is deprecated don''t write new
code against it).
That will make all text parts use UTF-8 encoding.
Anthony.
>