Forum

Yampiz Forum

Sharing let knowledge Spreaded, Reading let spirits growth, Creative let culture extended, Let us
  • 禁止廣告文
  • 知識傳播
  • 閱讀
  • 心靈成長
  • 創作
  • 文化傳承
Forum Dictionary / Programming / 網頁/網站程式 / DHtml /

mailto 參數 subject 在 utf-8下中文亂碼怎麼辦?

New Subject
Random
Previous
Next
|
mailto 參數 subject 在 utf-8下中文亂碼怎麼辦?

mailto連結下可藉參數subject=XXXX來設定郵件主旨
範例:
$subject = "我是誰"; ("我是誰"UTF-8編碼中文字是由資料庫裡抓出來的)
$email = "david@XXX.XXX.XX";
("david@XXX.XXX.XX"也是由資料庫裡抓出來的)
現在,在php文件中寫上一段寄發郵件程序的連結:
echo "<a href=\"mailto:$email?Subject=Re: $subject\">For you</a>";
問題來了!當我點選網頁上 "For you" 連結,啟動發件軟體(Outlook Express) 收件人email address 正確無誤,但是主旨就是一片亂碼了,請問這要怎麼辦?
我的作業環境是win2000,PHP_4.3.9,Mysql_3.23.49,Apache2.0.49
期待高手相助!感恩不盡
  • Keywords : 連結, subject, email, david, 點選網頁上, 範例, 正確無誤, 收件人email, 感恩不盡, 問題來, 作業環境, 亂碼, 主旨就, win2000, mailto, address, Subject, PHP_4, Outlook, Mysql_3
0 0
2009-03-14T15:33:18+0000

魚戀秋波 Neil Y.K. :

Outlook​Express​ 基本上是使用 BIG5 編碼,但現在網站的設計大多都採用 UTF-8 萬國碼作為預設文字編碼,所以經由連結送出的資料到了Outlook Express 自然就變成了亂碼囉!

可以試著把資料先轉成 big5 編碼試看看,可以再加上 url_encode 的函式去避免中文字的跳脫問題。

祝你成功!
0 0
2009-03-14T17:33:08+0000

學生妹瀨043811 :

!!! The contents has been hidden because it violates policy tactic. !!!
0 0
2019-01-29T16:52:19+0000


  • Now, you can post comments by Facebook Account when your Yampiz account was logout or unvariable. whatever, we suggest to post comment by Yampiz Account to get more bounds to join new events of Heyxu
Comment
 
Verify
  • Auto Platform
    For better browsing experience, it will auto detects your device to display webpage.
  • Bug Report
    Tell us about the idea, problem and errors you found.
  • Comodo Secure
    The sensitive data transmission adopts by SSL-2048 authenticated encryption.
  • Copyright
    © 2009 YamPiz Digital Inc. & Jaby Group. All rights reserved.
  • Revised Version
    V2.2.197
    29 Oct 2024 (GMT+8)