apple-notes-to-sqlite icon indicating copy to clipboard operation
apple-notes-to-sqlite copied to clipboard

Character encoding problem

Open simonw opened this issue 1 year ago • 2 comments

I ran against a recent note with this in it:

Or just "Actions ⚙️ "

And got back:

image

Actions ⚙️

Pasting that into https://ftfy.vercel.app/?s=Actions+%E2%80%9A%C3%B6%C3%B4%C3%94%E2%88%8F%C3%A8+ gives this:

s = 'Actions â\x80\x9aöôÃ\x94â\x88\x8fè'
s = s.encode('latin-1')
s = s.decode('utf-8')
s = s.encode('macroman')
s = s.decode('utf-8')
print(s)
image

simonw avatar Mar 09 '23 16:03 simonw

I'm experiencing something similar. My apostrophes (') turn into (’) and the output is truncated. Hoping to debug next weekend Screenshot 2023-04-02 at 4 24 10 PM

amlestin avatar Apr 02 '23 21:04 amlestin

Just changing the encoding in extract_notes to utf8 seems to fix it for my titles that were messed up.

Screen Shot 2023-04-14 at 5 14 18 PM

sirnacnud avatar Apr 14 '23 15:04 sirnacnud