Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
> which are way more reliable? In that case, you do have a 1:1 lookup > and you shouldn't have a problem. I was unaware of the different versions of IDNA. I basically started using the Perl module IDNA::Punycode in my project and assumed that this was the only type. Seems like I need

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
possibly interesting for collaboration, let me know & I'll try > to put together the relevant people. Those functions would be very useful to me. I know a bit of C, but probably not enough to produce an acceptable patch. If there are people who would also find these functions useful, an

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
t; > I'm not for knowing the rules of punycode but I'm not seeing what value > lower() provides here... Case insensitive matching. So that "EXAMPLE.COM" = "example.com" -- Mike Cardwell https://grepular.com https://emailprivacytester.com OpenPGP Key

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
inal and creating an index on the punycode version. This is exactly the same method that we commonly use for performing case insensitive text searches using lower() indexes. -- Mike Cardwell https://grepular.com https://emailprivacytester.com OpenPGP Key35BC AF1D 3AA2 1F84 3DC3 B0CF 70A5 F5

Re: [GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
as input, I would just do: WHERE lower(punycode_encode(hostname)) = lower(punycode_encode('any-representation')) There doesn't need to be any extra table storage for the punycode encoded version. -- Mike Cardwell https://grepular.com https://emailprivacytester.com OpenPGP Key35

[GENERAL] Hostnames, IDNs, Punycode and Unicode Case Folding

2014-12-29 Thread Mike Cardwell
speed. I'm new to Postgres, and to this list, so if there is a better way for me to submit this suggestion or solve my problem, please point me in the right direction. [1] http://www.unicode.org/Public/UNIDATA/CaseFolding.txt Regards, -- Mike Cardwell https://grepular.com https://emailprivac