<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 30, 2016, at 1:18 PM, Andre LaBranche &lt;<a href="mailto:dre@apple.com" class="">dre@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">This is not expected. Does memcached need to be configured for Unicode, maybe?</span></div></blockquote></div><br class=""><div class="">It looks like we expect to be in ascii mode, as far as memcached is concerned:</div><div class=""><br class=""></div><div class="">You can debug the memcache side of this by configuring calendarserver to not launch memcached; instead you'll do so manually, in the foreground.</div><div class=""><br class=""></div><div class="">Edit caldavd.plist, and insert the following Pools configuration under the Memcached dict:</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp;&nbsp;&lt;key&gt;Pools&lt;/key&gt;<br class="">&nbsp; &nbsp; &nbsp;&nbsp;&lt;dict&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;key&gt;Default&lt;/key&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;dict&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;key&gt;MemcacheSocket&lt;/key&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;string&gt;&lt;/string&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;key&gt;ServerEnabled&lt;/key&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;false/&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;key&gt;BindAddress&lt;/key&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;string&gt;127.0.0.1&lt;/string&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;key&gt;Port&lt;/key&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;integer&gt;11211&lt;/integer&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;/dict&gt;<br class="">&nbsp; &nbsp; &nbsp;&nbsp;&lt;/dict&gt;</div><div class=""><br class=""></div><div class="">Manually start memcached in verbose mode on 127.0.0.1:</div><div class="">memcached -l 127.0.0.1 -vv</div><div class=""><br class=""></div><div class="">Start calendar server, load a principal page: <a href="https://whatever:8443/principals/users/you" class="">https://whatever:8443/principals/users/you</a></div><div class=""><br class=""></div><div class="">As you log in, you should see stuff in the memcached window:</div><div class=""><br class=""></div><div class="">&lt;22 new auto-negotiating client connection<br class="">22: Client using the <b class="">ascii protocol</b><br class="">&lt;22 get DIGESTCREDENTIALS:...</div><div class="">&gt;22 END<br class=""><br class=""></div><div class=""><br class=""></div><div class="">Also try the following test script which sets and gets unicode strings. bytes. whatever they are :) In SVN mode, I run ./bin/python mctest.py from the SVN dir to make sure the interpreter has access to six and memcache. If you don't use SVN mode, and don't have these modules installed system-wide, edit PYTHONPATH to help your interpreter find these modules.</div><div class=""><br class=""></div><div class="">#!/usr/bin/python<br class=""># -*- coding: latin-1 -*-<br class="">from __future__ import print_function<br class=""><br class="">import six<br class="">from memcache import Client, SERVER_MAX_KEY_LENGTH, SERVER_MAX_VALUE_LENGTH<br class=""><br class="">servers = ["127.0.0.1:11211"]<br class="">mc = Client(servers, debug=1)<br class=""><br class="">def setget(key, val):<br class="">&nbsp; &nbsp; mc.set(key, val)<br class="">&nbsp; &nbsp; newval = mc.get(key)<br class="">&nbsp; &nbsp; print("key:", key)<br class="">&nbsp; &nbsp; print("set:".rjust(8), val)<br class="">&nbsp; &nbsp; print ("got:".rjust(8), newval, "\n")<br class=""><br class="">setget("ascii", "xyzzy")<br class=""><br class="">setget("unicode_1", six.u('\U0001f648'))<br class="">setget("unicode_2", six.u('\u25c9'))<br class="">setget("unicode_3", six.u('\u4f1a'))<br class="">setget("unicode_4", six.u('dr\\xe9'))<br class=""><br class="">mc.disconnect_all()<br class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Output looks like:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">key: ascii</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; set: xyzzy</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; got: xyzzy&nbsp;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">key: unicode_1</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; set: ðŸ™ˆ</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; got: ðŸ™ˆ&nbsp;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">key: unicode_2</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; set: â—‰</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; got: â—‰&nbsp;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">key: unicode_3</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; set: ä¼š</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; got: ä¼š&nbsp;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">key: unicode_4</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; set: dré</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; got: dré&nbsp;</div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">... and the memcached log confirms we're still in ascii mode:</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">&lt;25 new auto-negotiating client connection<br class="">25: Client using the ascii protocol<br class="">&lt;25 set ascii 0 0 5&nbsp;<br class="">&gt;25 STORED<br class="">&lt;25 get ascii<br class="">&gt;25 sending key ascii<br class="">&gt;25 END<br class="">&lt;25 set unicode_1 0 0 4&nbsp;<br class="">&gt;25 STORED<br class="">&lt;25 get unicode_1<br class="">&gt;25 sending key unicode_1<br class="">&gt;25 END<br class=""></span></font><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">-dre</div></body></html>