190 |
my %item; |
my %item; |
191 |
$item{no_value} = 1; |
$item{no_value} = 1; |
192 |
$item{comment} = $parameter->{comment}; |
$item{comment} = $parameter->{comment}; |
193 |
if ($parameter->{charset} ne '*bare') { |
if ($parameter->{charset} ne '*bare') { ## non quoted-string |
194 |
my %s = &{$self->{option}->{hook_decode_string}} |
my %s = &{$self->{option}->{hook_decode_string}} |
195 |
($self, $parameter->{attribute}, |
($self, $parameter->{attribute}, |
196 |
charset => $option->{encoding_before_decode}, |
charset => $option->{encoding_before_decode}, |
197 |
type => 'parameter/no-value-attribute'); |
type => 'parameter/no-value-attribute'); |
198 |
if ($s{charset}) { ## Convertion failed |
if ($s{charset}) { ## Convertion failed |
199 |
$item{charset} = $s{charset}; |
$item{charset} = $s{charset}; |
200 |
|
} elsif (!$s{success}) { |
201 |
|
$item{charset} = $option->{header_default_charset_input}; |
202 |
} |
} |
203 |
$item{attribute} = $s{value}; |
$item{attribute} = $s{value}; |
204 |
} else { |
} else { |
210 |
$item{attribute} = $parameter->{attribute}; |
$item{attribute} = $parameter->{attribute}; |
211 |
$item{language} = $parameter->{language} if $parameter->{language}; |
$item{language} = $parameter->{language} if $parameter->{language}; |
212 |
$item{comment} = $parameter->{comment}; |
$item{comment} = $parameter->{comment}; |
213 |
if ($parameter->{charset} ne '*bare') { |
if ($parameter->{charset} ne '*bare') { ## non 2231 encoded |
214 |
my %s = &{$self->{option}->{hook_decode_string}} |
my %s = &{$self->{option}->{hook_decode_string}} |
215 |
($self, $parameter->{value}, |
($self, $parameter->{value}, |
216 |
charset => $parameter->{charset} || $option->{encoding_before_decode}, |
charset => $parameter->{charset} || $option->{encoding_before_decode}, |
217 |
type => 'parameter/value/quoted-string'); |
type => 'parameter/value/quoted-string'); |
218 |
if ($s{charset}) { ## Convertion failed |
if ($s{charset}) { ## Convertion failed |
219 |
$item{charset} = $s{charset}; |
$item{charset} = $s{charset}; |
220 |
|
} elsif (!$s{success}) { |
221 |
|
$item{charset} = $option->{header_default_charset_input}; |
222 |
} elsif ($parameter->{charset}) { |
} elsif ($parameter->{charset}) { |
223 |
$item{output_charset} = $parameter->{charset}; |
$item{output_charset} = $parameter->{charset}; |
224 |
} |
} |