Changeset 23364 for main/trunk/greenstone2
- Timestamp:
- 2010-12-01T13:13:56+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/BasePlugin.pm
r23363 r23364 654 654 if (!defined $self->{'filesystem_encoding'}) { 655 655 $self->{'filesystem_encoding'} = $self->get_filesystem_encoding(); 656 $self->{'filesystem_encoding'} = "undefined" if !defined $self->{'filesystem_encoding'};657 656 } 658 657 … … 760 759 my $current_locale = setlocale(LC_CTYPE); 761 760 762 if ($current_locale =~ m/^.*\.(.*?)$/) { 763 my $char_encoding = lc($1); 761 my $char_encoding = undef; 762 if ($current_locale =~ m/\./) { 763 ($char_encoding) = ($current_locale =~ m/^.*\.(.*?)$/); 764 $char_encoding = lc($char_encoding); 765 } 766 else { 767 if ($current_locale =~ m/^(posix|c)$/i) { 768 $char_encoding = "ascii"; 769 } 770 } 771 772 if (defined $char_encoding) { 764 773 if ($char_encoding =~ m/^(iso)(8859)(\d{1,2})$/) { 765 774 $char_encoding = "$1\_$2\_$3"; … … 942 951 943 952 my $url_encoded_filename; 944 if ( defined $filename_encoding) {953 if ((defined $filename_encoding) && ($filename_encoding ne "ascii")) { 945 954 # => Generate a pretty print version of filename that is mapped to Unicode 946 955
Note:
See TracChangeset
for help on using the changeset viewer.