<html><head><style type="text/css" media="screen">Body{font-family: Verdana;font-size:.75em;}h4{font-size:.9em;}a{color: #3a62a6;}.digest .toc {margin-bottom: 15px; padding-bottom:8px; border-bottom: 1px solid #ccc;}.digest .tocItem {margin-bottom: 15px;}.tocItem a{color:#000;text-decoration: none;}.tocItem a:hover{color: #3a62a6;text-decoration: underline;}.topic{padding-bottom: 8px;margin-bottom: 20px; border-bottom: 1px solid #ccc;}.topicHeader{margin-bottom:10px;}.topicTitle{font-weight: bold;}.replies p{margin:0;padding:0;}.replies hr{width: 15%;text-align: left;margin: 0 auto 5px 0;border: none 0;border-top: 1px solid #ccc;height: 1px;}.reply{margin-bottom: 6px;padding-bottom: 4px;}.anchorMarker{color: #3a62a6;}.footer{color: gray;}</style></head><body><div class="digest"><p>Hi ironpython,</p><p>Here's your Daily Digest of new issues for project "<a href="http://ironpython.codeplex.com/">IronPython</a>".</p><p>In today's digest:</p><h4>ISSUES</h4><div class="toc"><div class="tocItem"><a href="#toc_issue_1">1. <span class="tocTitle">[New issue] boolean type from databinding is not json compatible</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_2">2. <span class="tocTitle">[New issue] Lower casing non-ASCII characters does not work</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_3">3. <span class="tocTitle">[New comment] Lower casing non-ASCII characters does not work</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_4">4. <span class="tocTitle">[New comment] Lower casing non-ASCII characters does not work</span> <span class="anchorMarker">↓</span></a></div></div><h4>ISSUES</h4><div class="topic"><a name="toc_issue_1"></a><div class="topicHeader"><span class="topicTitle">1. [New issue] boolean type from databinding is not json compatible</span> <a href="http://ironpython.codeplex.com/workitem/33134">view online</a></div><p>User barbar01 has proposed the issue:</p><p>"You have to cast explicit with bool(a) if a is a boolean set by databinding.<br />json.dumps(a) would create a small written "true","false" which json could not reload."</p></div><div class="topic"><a name="toc_issue_2"></a><div class="topicHeader"><span class="topicTitle">2. [New issue] Lower casing non-ASCII characters does not work</span> <a href="http://ironpython.codeplex.com/workitem/33133">view online</a></div><p>User pekkaklarck has proposed the issue:</p><p>"Interestingly upper() works but lower() doesn't. Tested with some Scandinavian letters but not with other scripts.<br /><br />To reproduce:<br /><br />IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.269 (32-bit)<br />Type "help", "copyright", "credits" or "license" for more information.<br />>>> a = u'\xe4'   # Character 'ä'<br />>>> A = a.upper()<br />>>> A<br />u'\xc4'    # Correctly produces 'Ä'<br />>>> a.islower()<br />True<br />>>> A.islower()<br />False<br />>>> A.lower()<br />u'\xc4'     # Wrong! Still 'Ä'<br />>>> A.lower() == a<br />False<br />>>> A.lower() == A<br />True"</p></div><div class="topic"><a name="toc_issue_3"></a><div class="topicHeader"><span class="topicTitle">3. [New comment] Lower casing non-ASCII characters does not work</span> <a href="http://ironpython.codeplex.com/workitem/33133">view online</a></div><p>User pekkaklarck has commented on the issue:</p><p>"Very interestingly swapcase() works:<br /><br />>>> a = u'\xe4'<br />>>> A = a.upper()<br />>>> A.swapcase() == a<br />True<br />>>> a.swapcase() == A<br />True<br /><br />This allowed me to create the following workaround function:<br /><br />    def lower(string):<br />        return ''.join(c if not c.isupper() else c.swapcase() for c in string)<br />"</p></div><div class="topic"><a name="toc_issue_4"></a><div class="topicHeader"><span class="topicTitle">4. [New comment] Lower casing non-ASCII characters does not work</span> <a href="http://ironpython.codeplex.com/workitem/33133">view online</a></div><p>User pekkaklarck has commented on the issue:</p><p>"My workaround function was unfortunately slow but could luckily be optimized in common case (including when not running on IronPython). Here's the final code:<br /><br /><br />if sys.platform != 'cli':<br /><br />    def lower(string):<br />        return string.lower()<br /><br />else:<br /><br />    def lower(string):<br />        if string.islower():<br />            return string<br />        if not _has_non_ascii_chars(string):<br />            return string.lower()<br />        return ''.join(c if not c.isupper() else c.swapcase() for c in string)<br /><br />    def _has_non_ascii_chars(string):<br />        for c in string:<br />            if c >= u'\x80':<br />                return True<br />        return False<br />"</p></div><div class="footer"><p>You are receiving this email because you subscribed to notifications on CodePlex.</p><p>To report a bug, request a feature, or add a comment, visit <a href="http://ironpython.codeplex.com/workitem/list/basic">IronPython Issue Tracker</a>. You can <a href="https://ironpython.codeplex.com/subscriptions/workitem/project/edit">unsubscribe or change your issue notification settings</a> on CodePlex.com.</p></div></div></body></html>