nā leka uila () ma PHP me UTF-8 a me nā umlauts

Hoʻouna maikaʻi ʻia ka hoʻouna ʻana i nā leka uila me PHP me nā papa ikaika e like me PHPMailer . Hiki i nā hana wahī maʻalahi ke hoʻohana i ka ʻike UTF-8, e hoʻokomo i nā kiʻi a hoʻouna i nā hoʻopili kope ʻia me kekahi mau lālani o ke code. Inā makemake ʻoe e mālama iā ʻoe iho ma luna a, i kūʻē i ka ʻōlelo aʻoaʻo, e hoʻohana i ka leka uila ʻo PHP () , e loaʻa ʻoe i nā pilikia i ka hoʻohana ʻana i nā umlauts a me UTF-8 ma ka hope loa.


Ma hope o ke kāhea ʻana i ka hana me

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

i kahi faila i hoʻopaʻa ʻia ʻo UTF-8 i kēia manawa e alakaʻi i nā pilikia i ka pahu pahu: ʻoluʻolu ʻo Outlook 2013 a hōʻike pololei i nā mea āpau:

leka uila1

Akā ʻaʻole kala ʻo GMX i nā poʻo poʻomanaʻo e nalowale ana a hōʻike i kahi kumuhana maikaʻi ʻole, mea hoʻouna a me nā ʻike:

leka uila2

Inā ʻoe e hoʻouna i nā poʻo poʻo pololei (e laʻa me base64_encode), loaʻa iā ʻoe

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)
);

a ʻo ka hopena, hōʻike pū ʻo GMX i kahi hōʻike pololei:

leka uila3

Hope