boostada () gudaha PHP oo leh UTF-8 iyo umlauts

Ku-qoritaanka PHP-ga waxaa sida ugu wanaagsan lagu sameeyaa fasallo xoog leh sida PHPMailer . Xirmooyinka fudfudud ee ku duudduubnaa waxay suurtogal ka dhigayaan in loo adeegsado waxyaabaha ku jira UTF-8 oo leh khaddo lambar oo dhowr ah, sawirro la galiyo iyo loo diro lifaaqyo qarsoodi ah. Haddii aad rabto inaad keydiso dusha sare oo, liddi ku ah talo soo jeedinta, isticmaal waraaqaha shaqada ee loo yaqaan 'PHP mail mail' () , waxaad la kulmaysaa dhibaatooyin ugu dambeeya markaad isticmaaleyso umlauts iyo UTF-8.


Ka dib markii aad wacdo shaqada la

mail(
   "vieldav@gmx.de",                          // Empfänger
   "ä ö ü ß",                                 // Betreff
   "ä ö ü ß",                                 // Inhalt
   "From: ä ö ü ß <david@vielhuber.de>"       // Header (Absender)
);

kujira faylka loo yaqaan &#39;UTF-8 file encoded&#39; oo horeyba u horseedaya dhibaatooyin sanduuqa: Muuqaalka 2013 wali waa mid nimco leh oo wax walba si sax ah u soo bandhigaya:

boostada1

Laakiin mar hore GMX ma cafinayso madaxdii ka maqnayd waxayna muujineysaa mowduuc aan lagu guuleysan, diraa iyo waxa ku jira:

boostada2

Haddii aad dirto madax madax sax ah (tusaale ahaan base64_encode), waad heleysaa

mail(
   "vieldav@gmx.de",                          				  // Empfänger
   "=?UTF-8?B?".base64_encode("ä ö ü ß")."?=",                            // Betreff
   "ä ö ü ß",                                 			 	  // Inhalt
   "Content-type: text/plain; charset=utf-8\r\n"
  ."From: =?UTF-8?B?".base64_encode("ä ö ü ß")."?=<david@vielhuber.de>"   // Header (Absender)
);

iyo ugu dambeyntii GMX waxay sidoo kale muujineysaa matalaad sax ah:

mail3

Soo noqo