File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -226,16 +226,8 @@ namespace Exiv2 {
226226 if ( ti ) {
227227 fct = ti->printFct_ ;
228228 if ( ti->typeId_ == comment ) {
229- fct=NULL ;
230- const Exiv2::CommentValue* cv = dynamic_cast <const Exiv2::CommentValue*>(&value ());
231- Exiv2::CommentValue::CharsetId csId = cv->charsetId ();
232- if ( csId != CommentValue::undefined ) {
233- os << " charset=" << CommentValue::CharsetInfo::name (csId) << " " ;
234- }
235- os << cv->comment ();
236- #if 0
237- os << "|| value().toString() = " << value().toString();
238- #endif
229+ os << value ().toString ();
230+ fct=NULL ;
239231 }
240232 }
241233 if ( fct ) fct (os, value (), pMetadata);
Original file line number Diff line number Diff line change @@ -548,6 +548,10 @@ namespace Exiv2 {
548548
549549 std::ostream& CommentValue::write (std::ostream& os) const
550550 {
551+ CharsetId csId = charsetId ();
552+ if (csId != undefined) {
553+ os << " charset=" << CharsetInfo::name (csId) << " " ;
554+ }
551555 return os << comment ();
552556 }
553557
You can’t perform that action at this time.
0 commit comments