snipt

Ctrl+h for KB shortcuts

PHP

Utf email send function

1
2
3
4
5
function mail_utf8($to, $subject = '(No subject)', $message = '', $header = '') {
  $header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/plain; charset=UTF-8' . "\r\n";
  mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header_ . $header);
}
 
https://snipt.net/embed/0f4f28352ddb605fb632dc0a50719b3c/
https://snipt.net/raw/0f4f28352ddb605fb632dc0a50719b3c/
0f4f28352ddb605fb632dc0a50719b3c
php
PHP
5
2016-09-21T14:02:35
True
False
False
/api/public/snipt/38190/
utf-email-send-function
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x">function mail_utf8($to, $subject = &#39;(No subject)&#39;, $message = &#39;&#39;, $header = &#39;&#39;) {</span> </span><span id="L-2"><a name="L-2"></a><span class="x"> $header_ = &#39;MIME-Version: 1.0&#39; . &quot;\r\n&quot; . &#39;Content-type: text/plain; charset=UTF-8&#39; . &quot;\r\n&quot;;</span> </span><span id="L-3"><a name="L-3"></a><span class="x"> mail($to, &#39;=?UTF-8?B?&#39;.base64_encode($subject).&#39;?=&#39;, $message, $header_ . $header);</span> </span><span id="L-4"><a name="L-4"></a><span class="x">}</span> </span><span id="L-5"><a name="L-5"></a><span class="x"> </span> </span></pre></div> </td></tr></table>
email, send, unicode, utf8
https://snipt.net/embed/9f7d800650e68226cca1efad21e1b847/
https://snipt.net/raw/9f7d800650e68226cca1efad21e1b847/
9f7d800650e68226cca1efad21e1b847
java
Java
1
2016-09-25T01:30:26
True
False
False
/api/public/snipt/17600/
strage-java-behavious-unicode-error-in-comments
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c1">// \u</span> </span></pre></div> </td></tr></table>
bug, comments, java, unicode

HTML

The Option key

1
2
3
4
5
6
7
The Option key

&#8997;


http://en.wikipedia.org/wiki/Option_key
http://www.fileformat.info/info/unicode/char/2325/index.htm
https://snipt.net/embed/def99d78aff6efb5ee1b613219eb6335/
https://snipt.net/raw/def99d78aff6efb5ee1b613219eb6335/
def99d78aff6efb5ee1b613219eb6335
html
HTML
7
2016-09-22T19:31:46
True
False
False
/api/public/snipt/15135/
the-option-key
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>The Option key </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="ni">&amp;#8997;</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a>http://en.wikipedia.org/wiki/Option_key </span><span id="L-7"><a name="L-7"></a>http://www.fileformat.info/info/unicode/char/2325/index.htm </span></pre></div> </td></tr></table>
entity, html, unicode

HTML

The Command key

1
2
3
4
5
6
7
The Command key (a.k.a. Saint John's Arms)

&#8984;


http://en.wikipedia.org/wiki/Command_key
http://www.fileformat.info/info/unicode/char/2318/index.htm
https://snipt.net/embed/727c8ad3324a1f4c187fdb2c8c5d8a07/
https://snipt.net/raw/727c8ad3324a1f4c187fdb2c8c5d8a07/
727c8ad3324a1f4c187fdb2c8c5d8a07
html
HTML
7
2016-09-22T19:31:53
True
False
False
/api/public/snipt/15134/
the-command-key
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>The Command key (a.k.a. Saint John&#39;s Arms) </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="ni">&amp;#8984;</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a>http://en.wikipedia.org/wiki/Command_key </span><span id="L-7"><a name="L-7"></a>http://www.fileformat.info/info/unicode/char/2318/index.htm </span></pre></div> </td></tr></table>
entity, html, unicode
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.