1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:07:34 +00:00

MacPDF: Use correct encoding for outline titles

The title of an OutlineItem is already in UTF-8.

This is currently done in LibPDF's Parser::parse_string(). I think
that's not quite the right place (it shouldn't be done for all strings)
and not done quite right (text strings should convert from
PDFDocEncoding to UTF-8 unless prefixed by an UTF-8 BOM), but even if
that changes, I think we'll keep OutlineItem.title in UTF-8.
This commit is contained in:
Nico Weber 2023-11-20 21:49:44 -05:00 committed by Andreas Kling
parent 148f873321
commit fac0a456e6

View file

@ -60,7 +60,7 @@
{
if (_groupName)
return _groupName;
return [NSString stringWithFormat:@"%s", _item->title.characters()]; // FIXME: encoding?
return [NSString stringWithUTF8String:_item->title.characters()];
}
@end