Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Slowroll:Base:1
id3lib
id3lib-3.8.3-fix-utf16-stringlists.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File id3lib-3.8.3-fix-utf16-stringlists.patch of Package id3lib
Based on a Debian patch by Urs Fleisch <urs.fleisch@gmail.com> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680915 Index: id3lib-3.8.3/src/io_helpers.cpp =================================================================== --- id3lib-3.8.3.orig/src/io_helpers.cpp +++ id3lib-3.8.3/src/io_helpers.cpp @@ -364,10 +364,17 @@ size_t io::writeUnicodeText(ID3_Writer& unicode_t BOM = 0xFEFF; writer.writeChars((const unsigned char*) &BOM, 2); unsigned char *pdata = (unsigned char *) data.c_str(); + unicode_t lastCh = BOM; for (size_t i = 0; i < size; i += 2) { unicode_t ch = (pdata[i] << 8) | pdata[i+1]; + if (lastCh == 0 && ch != BOM) + { + // Last character was NULL, so start next string with BOM. + writer.writeChars((const unsigned char*) &BOM, 2); + } writer.writeChars((const unsigned char*) &ch, 2); + lastCh = ch; } } return writer.getCur() - beg;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor