JID case sensitivity

Martin Atkins mart at degeneration.co.uk
Fri Mar 27 01:57:50 UTC 2009

Peter Saint-Andre wrote:
>> So, to summarize:
>> * The node (before the @) and domain should be case-insensitive.
>> * The resource should be case-sensitive.
> With the caveat that the concept of case sensitivity applies only to
> US-ASCII characters and not the rest of the Unicode characters, yes.
>> So when DJabberd parses a JID, it ought to normalize the case in the
>> node and domain parts. It must presumably do this in a way defined in
>> stringprep rather than relying on Perl's in-built ability to turn
>> strings to lowercase.
> Does Perl's in-built ability apply to US-ASCII only or also to any
> Unicode character (e.g., normalizing ∏ to π or whatever)?

If we only need to worry about US-ASCII characters then this should be 
pretty easy. Perl's default behavior is to do ASCII-only case 
conversions, with the option of doing something Unicode-ish, but we 
don't really make use of Perl's Unicodey features in DJabberd so only 
having to worry about US-ASCII makes life much easier.

Thanks for the hints.

More information about the Djabberd mailing list