battery icon indicating copy to clipboard operation
battery copied to clipboard

fix: remove unicode chars before parsing battery XML

Open JanDeDobbeleer opened this issue 4 years ago • 5 comments

We could argue this fix should be added to @DHowett 's go-plist utility, but I felt more comfortable adding the change here for the time being as I needed a working fork. This issue only seems to pop up when fully charged, with this change it can once again parse and provide battery information.

JanDeDobbeleer avatar Sep 09 '20 08:09 JanDeDobbeleer

I'd be interested in hearing that argument! 😄

DHowett avatar Sep 09 '20 17:09 DHowett

Interesting indeed. Would you be able to provide example of the input that's breaking it? I've never seen this myself, but then again I'm using English as OS language which is "easy path".

KenjiTakahashi avatar Sep 09 '20 17:09 KenjiTakahashi

I'd be interested in hearing that argument! 😄

Well, it's failing in your utility because of that "illegal character". In my opinion, if the goal of a utility is to parse plist files on MacOS and it can't handle some of the platform files being thrown at it, we have to correct it there. I'm also using EN as the language on my laptop, although region info might change. Let me see if I can reproduce this and provide input for the discussion 😁

JanDeDobbeleer avatar Sep 10 '20 17:09 JanDeDobbeleer

What is the invalid codepoint/bytes, and where?

floam avatar Dec 23 '22 19:12 floam

@floam it's been 2 years and we've moved on to other means 😃

JanDeDobbeleer avatar Dec 23 '22 21:12 JanDeDobbeleer