I use OneNote to keep all usefull info for my work, including SQL queries.
So I copy paste them between OneNote and Microsoft SSMS (SQL Server Management Studio)
When I do so, I have often wrong characters in SSMS that I must remove manually.
In the other way around (from SSMS to OneNote), the nice color SQL formatting is lost (I can put it into MS Word and then OneNote and it works but it is not very practical).