Failed to archive JPEG (ArchiveMember): Invalid UTF-8 sequence (at index 1)

Ki Rill rill.ki at yahoo.com
Sat Jan 14 01:16:16 UTC 2023


On Saturday, 14 January 2023 at 01:13:33 UTC, Adam D Ruppe wrote:
> On Saturday, 14 January 2023 at 01:08:25 UTC, Ki Rill wrote:
>> a JPEG image.
>>
>>     
>> member.expandedData(file.readText().dup().representation());
>
> A jpeg image is not a text file. Read it with `std.file.read()` 
> instead of `readText`. Then you can get rid of those useless 
> dup.representation calls too.

Thank you for such a quick reply! It solved my issue!


More information about the Digitalmars-d-learn mailing list