Apple Plist Error "Unexpected character 'b' at line 1"
Asked Answered
K

1

6

I'm having issues reading a binary PList. I'm using a windows computer and I've tried several pList readers. I really can't seem to get past the error "unexpected character 'b' at line 1".

Keitloa answered 23/7, 2015 at 18:9 Comment(7)
Is it a binary plist?Wick
@Wick probably yes: the Apple binary plist format begins with the character sequence bplist. I can imagine that OP uses plist readers that can only interpret plists in textual (XML/OpenStep) format, but not binary plists.Cowell
Yup; I think the only recourse is to use plutil -convert xml1 file.plist on a Mac first. Although there is something called libplist knocking about. See this article.Wick
Plutil gives me a similar error. Let me get it for you. And iTunes bundles a windows equivalent to plutil fyi.Keitloa
Plutil error: "Unexpected character b at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set".Keitloa
@Ben: for what it's worth, I'm getting that same error on a plist file I extracted from a sqlite3 database from Final Cut Pro, on a Mac running MacOS Yosemite 10.10.5... So, it seems plutil doesn't recognize binary plists anymore? Which seems awfully strange... or maybe there's some other detail. Seems like maybe trying to use the CoreFoundation framework and reading it using a format of kCFPropertyListBinaryFormat_v1_0?? Though I'm also finding some hints of more recent versions of binary plists, so... ?? Anyway, you're not alone in seeing this error!Giddens
p.s. See also, especially in case you want to try to read the file by writing code (I might try, we'll see): https://mcmap.net/q/1919584/-c-parse-binary-plistGiddens
T
0

I just had the same issue. I previously made the mistake of editing the bplist with a text editor and reverting the change with said text editor afterwards. Even though the edited file looked exactly the same as the original in a text editor, their binary representation was not the same anymore.

This is why plutil failed to convert the file for me. Hope this helps someone!

Trichinosis answered 6/2, 2024 at 22:29 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.