Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dffb7fd7

Von Moritz Bunkus vor etwa 15 Jahren hinzugefügt

  • ID dffb7fd7f6cb0a71c6fdd98046e783868c415c75
  • Vorgänger aa6b50c0
  • Nachfolger 3eefb02f

Die verschiedenen Iconv-Handle immer anlegen, auch wenn das locale-Verzeichnis nicht existiert.

Teil eines Bugfixes für Bug 1037.

Unterschiede anzeigen:

SL/Locale.pm
66 66
  my $country  = shift;
67 67
  my $NLS_file = shift;
68 68

  
69
  $self->{charset}     = Common::DEFAULT_CHARSET;
70
  $self->{countrycode} = $country;
71
  $self->{NLS_file}    = $NLS_file;
72

  
69 73
  if ($country && -d "locale/$country") {
70 74
    local *IN;
71
    $self->{countrycode} = $country;
72 75
    if (open(IN, "<", "locale/$country/$NLS_file")) {
73 76
      my $code = join("", <IN>);
74 77
      eval($code);
......
80 83
      close IN;
81 84

  
82 85
      chomp $self->{charset};
83

  
84
    } else {
85
      $self->{charset} = Common::DEFAULT_CHARSET;
86 86
    }
87
  }
87 88

  
88
    my $db_charset            = $main::dbcharset || Common::DEFAULT_CHARSET;
89

  
90
    $self->{iconv}            = Text::Iconv->new($self->{charset}, $db_charset);
91
    $self->{iconv_reverse}    = Text::Iconv->new($db_charset,      $self->{charset});
92
    $self->{iconv_english}    = Text::Iconv->new('ASCII',          $db_charset);
93
    $self->{iconv_iso8859}    = Text::Iconv->new('ISO-8859-15',    $db_charset);
94
    $self->{iconv_to_iso8859} = Text::Iconv->new($db_charset,      'ISO-8859-15');
89
  my $db_charset            = $main::dbcharset || Common::DEFAULT_CHARSET;
95 90

  
96
    $self->_read_special_chars_file($country);
97
  }
91
  $self->{iconv}            = Text::Iconv->new($self->{charset}, $db_charset);
92
  $self->{iconv_reverse}    = Text::Iconv->new($db_charset,      $self->{charset});
93
  $self->{iconv_english}    = Text::Iconv->new('ASCII',          $db_charset);
94
  $self->{iconv_iso8859}    = Text::Iconv->new('ISO-8859-15',    $db_charset);
95
  $self->{iconv_to_iso8859} = Text::Iconv->new($db_charset,      'ISO-8859-15');
98 96

  
99
  $self->{NLS_file} = $NLS_file;
97
  $self->_read_special_chars_file($country);
100 98

  
101 99
  push @{ $self->{LONG_MONTH} },
102 100
    ("January",   "February", "March",    "April",

Auch abrufbar als: Unified diff