From 7aef7d125e19ce6e3bf0facc800e2df1729cbc62 Mon Sep 17 00:00:00 2001 From: indiri69 Date: Mon, 17 Jul 2006 19:39:23 +0000 Subject: [PATCH] Unicode support was added in Perl 5.6, use a less useful range in earlier versions. For those of use running antiquated servers. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11409 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/conf.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/conf.pl b/config/conf.pl index 5dd713d8..05f51c3b 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -4603,8 +4603,14 @@ sub clear_screen() { # checks IMAP mailbox name. Refuses to accept 8bit folders # returns 0 (folder name is not correct) or 1 (folder name is correct) sub check_imap_folder($) { + # Unicode support was added in Perl 5.6, use a less useful range in earlier versions + if($] >= 5.6) { + my $reg = '[\x{80}-\x{FFFF}]'; + } else { + my $reg = '[\x80-\xFF]'; + } my $folder_name = shift(@_); - if ($folder_name =~ /[\x{80}-\x{FFFF}]/) { + if ($folder_name =~ /$reg/) { # check for 8bit. Using iso-10646 range, because x80-xFF range does not match unicode chars print "Folder name contains 8bit characters. Configuration utility requires\n"; print "UTF7-IMAP encoded folder names.\n"; -- 2.25.1