[3681] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: [barnowl] Perl logging (#54)

daemon@ATHENA.MIT.EDU (Anders Kaseorg)
Thu Jan 2 08:31:30 2014

Date: Thu, 02 Jan 2014 05:31:27 -0800
From: Anders Kaseorg <notifications@github.com>
Reply-To: barnowl/barnowl <reply+i-1212393-313039cd867d577b5721069e10330b49395747f8-4475081@reply.github.com>
To: barnowl/barnowl <barnowl@noreply.github.com>
In-Reply-To: <barnowl/barnowl/pull/54@github.com>


----==_mimepart_52c56a2f446c1_77a31459d08222317
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable

The Unicode specification calls this [compatibility caseless matching](ht=
tp://www.unicode.org/versions/Unicode6.3.0/ch03.pdf), and the correct tra=
nsformation actually has five calls:
`NFKC(toCasefold(NFKD(toCasefold(NFD(string)))))`
Zephyr=E2=80=99s current implementation incorrectly [omits the innermost =
NFD](http://barnowl.mit.edu/ticket/231), but that difference only matters=
 for characters including U+0345 =E2=97=8C=CD=85 COMBINING GREEK YPOGEGRA=
MMENI. I think we should just write the correct version and get Zephyr fi=
xed.

Neither of these operations should be called `toNFKC_Casefold`, because t=
hat has slightly different behavior regarding Default_Ignorable_Code_Poin=
t. I propose `compat_casefold`. And I guess if Jabber wants it too, we sh=
ould move it to util.c.

Zephyr only applies compatibility casefolding to classes/instances, not t=
o senders/recipients/realms, which are simply compared with ASCII `strcas=
ecmp`. So I guess we should use only `lc` for usernames and only `uc` for=
 realm names. (On master, realms are entirely ignored for log filenames, =
right?)

I=E2=80=99m not sure if I agree with =E2=80=9CMake loggingdirection only =
apply to personals=E2=80=9D; see [my Trac comment](http://barnowl.mit.edu=
/ticket/242#comment:2).

The behavior change where non-Zephyr messages get dropped if `~/zlog/prot=
ocol` doesn=E2=80=99t exist is potentially nasty. Can we fall back to the=
 old path `~/zlog/people` instead?

---
Reply to this email directly or view it on GitHub:
https://github.com/barnowl/barnowl/pull/54#issuecomment-31452543=

----==_mimepart_52c56a2f446c1_77a31459d08222317
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p>The Unicode specification calls this <a href=3D"http://www.unicode.org=
/versions/Unicode6.3.0/ch03.pdf">compatibility caseless matching</a>, and=
 the correct transformation actually has five calls:<br><code>NFKC(toCase=
fold(NFKD(toCasefold(NFD(string)))))</code><br>
Zephyr=E2=80=99s current implementation incorrectly <a href=3D"http://bar=
nowl.mit.edu/ticket/231">omits the innermost NFD</a>, but that difference=
 only matters for characters including U+0345 =E2=97=8C=CD=85 COMBINING G=
REEK YPOGEGRAMMENI. I think we should just write the correct version and =
get Zephyr fixed.</p>

<p>Neither of these operations should be called <code>toNFKC_Casefold</co=
de>, because that has slightly different behavior regarding Default_Ignor=
able_Code_Point. I propose <code>compat_casefold</code>. And I guess if J=
abber wants it too, we should move it to util.c.</p>

<p>Zephyr only applies compatibility casefolding to classes/instances, no=
t to senders/recipients/realms, which are simply compared with ASCII <cod=
e>strcasecmp</code>. So I guess we should use only <code>lc</code> for us=
ernames and only <code>uc</code> for realm names. (On master, realms are =
entirely ignored for log filenames, right?)</p>

<p>I=E2=80=99m not sure if I agree with =E2=80=9CMake loggingdirection on=
ly apply to personals=E2=80=9D; see <a href=3D"http://barnowl.mit.edu/tic=
ket/242#comment:2">my Trac comment</a>.</p>

<p>The behavior change where non-Zephyr messages get dropped if <code>~/z=
log/protocol</code> doesn=E2=80=99t exist is potentially nasty. Can we fa=
ll back to the old path <code>~/zlog/people</code> instead?</p>

<p style=3D"font-size:small;-webkit-text-size-adjust:none;color:#666;">&m=
dash;<br>Reply to this email directly or <a href=3D'https://github.com/ba=
rnowl/barnowl/pull/54#issuecomment-31452543'>view it on GitHub</a>.<img s=
rc=3D'https://github.com/notifications/beacon/4475081__eyJzY29wZSI6Ik5ld3=
NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNDIwMjI4NywiZGF0YSI6eyJpZCI6MjI3OTE3NzN=
9fQ=3D=3D--14672ddbc84464af982a5f02da83833239bccd7a.gif' height=3D'1' wid=
th=3D'1'></p>=

----==_mimepart_52c56a2f446c1_77a31459d08222317--

home help back first fref pref prev next nref lref last post