- Status Closed
- Percent Complete
- Task Type Patches
- Category Playlists
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#5770 - skip BOM in playlists
When loading a playlist which has a BOM the first entry gets invalid and thus will be skipped. The attached patch looks if the playlist has a utf8 BOM and skips that. Also added m3u8 as recognized playlist format which is simply a m3u playlist with utf8 encoding and BOM. This format is generated by foobar2000. See also FS#5089 on this topic.
Patch tested on h120 sim.
Closed by learman
2006-09-10 11:09
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2006-09-10 11:09
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
Patch committed. Thanks!
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
I absolutely have no knowledge about BOM itself,
but in gwps-common.c is already a (local) function
called skip_utf8_bom which does more checks than
your version:
——————————————————
maybe you could create a patch which puts the skip_utf8_bom
to a global context and then use it for your purpose?
I don't think the added dependency is worth it. Also I need to increase some more variables, thus I'd need to make an additional check (if the buffer position changed) so I don't think using that function would be useful.
The check looks for a utf8 BOM which is the three bytes from the skip_utf8_bom function. On the other hand 0xef is in the extended character set so when assuming a non-utf playlist this wouldn't work at all. Thus I think it is sufficient to simply check for the first start of the BOM. I've entended the patch to look also for the other two BOM bytes but I think this isn't necessary at all.