Skip to content

Fix (file names): Decode OneNote's escape codes in section names - #194

Open
klangme1ster wants to merge 1 commit into
theohbrothers:masterfrom
klangme1ster:fix/file-names-decode-onenote-escape-codes-in-section-names
Open

klangme1ster wants to merge 1 commit into
theohbrothers:masterfrom
klangme1ster:fix/file-names-decode-onenote-escape-codes-in-section-names

Conversation

@klangme1ster

Copy link
Copy Markdown

OneNote reports characters that aren't allowed in section file names as '^' codes in the section's name, e.g. 'AI ^M ML' for a section named 'AI / ML', and 'DECT^J Bluetooth' for 'DECT & Bluetooth'. These codes ended up in folder names ('AI-^M--ML').

Decode '^M' to '/' and '^J' to '&' (the codes observed so far) before removing invalid file name characters, for notebook, section group and section names.

OneNote reports characters that aren't allowed in section file names as '^' codes in the section's name, e.g. 'AI ^M  ML' for a section named 'AI / ML', and 'DECT^J Bluetooth' for 'DECT & Bluetooth'. These codes ended up in folder names ('AI-^M--ML').

Decode '^M' to '/' and '^J' to '&' (the codes observed so far) before removing invalid file name characters, for notebook, section group and section names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant