Opened 8 years ago

Last modified 5 years ago

#231 new defect

barnowl filters should match Zephyr normalization rules

Reported by: Owned by:
Priority: minor Milestone:
Component: zephyr Keywords:


Zephyr normalizes class names to NFKC when determining whether a message matches a subscription (see server/zstring.c). We should do the same thing when determining whether a message matches a filter.

I don't particularly see a libzephyr function for normalizing a class name -- we should perhaps ask for one, to avoid repeating code.

Change History (5)

comment:1 Changed 8 years ago by

Zephyr actually normalizes to case-folded NFKC. (It should be noted that it’s important to do this operation in the right order. The Unicode standard calls it toNFKC_Casefold().)

comment:2 Changed 7 years ago by

What is the right order to do this?

comment:3 Changed 7 years ago by

According to my understanding of the specification (see §3.13 Default Case Algorithms), the official definition is NFKC(toCasefold(NFKD(toCasefold(NFD(string))))), modulo some mumblings about Default_Ignorable_Code_Point… um… let me get back to you on this.

comment:4 Changed 7 years ago by

Experimentally, the Zephyr implementation omits the initial NFD step: zdowncase(1F0 300 316 345 346 37A) == 1F0 316 300 3B9 346 20 3B9. And it doesn’t seem to do anything special with Default_Ignorable_Code_Point. So I guess that’s NFKC(toCasefold(NFKD(toCasefold(string)))).

Omitting the initial NFD step seems like a Zephyr bug, though—it might be summon-asedeno-o’clock.

comment:5 Changed 7 years ago by

I’ve sent a bug report to utf8proc upstream (reply, reply, reply, GitHub issue with new maintainer), and a pointer back here to Zephyr upstream.

Last edited 5 years ago by (previous) (diff)
Note: See TracTickets for help on using tickets.