readwiseio / obsidian-readwise

Official Readwise plugin for Obsidian
GNU General Public License v3.0
257 stars 24 forks source link

The CJK file name is unreadable #3

Closed taiansu closed 3 years ago

taiansu commented 3 years ago

The official plugin use normalizePath to generate file name (at here), which will romanize the CJK file names and basically make them become noise instead of information.

Here is the screenshot showing the difference of synced file names from the official plugin and the community one.

截圖 2021-08-11 02 23 25

So in the community plugin, it simply sanitize the name using some regular expressions, but not nomalize it.

lishid commented 3 years ago

Just want to update here that normalizePath is internally used throughout Obsidian so it shouldn't romanicize CJK or anything - it only converts \ to / and normalizes Unicode representation to NFC form. CJK characters should be left as-is.

tadeoos commented 3 years ago

@taiansu thanks a lot for reporting this! In the end, it wasn't about the normalizePath function — we do some title sanitization before we even send data to Obsidian. As you pointed out — it was definitely lacking :)

It's now fixed. If you delete your Readwise base folder in Obsidian and trigger the sync again, you should be seeing the correct file names.

Let me know if this is not the case!