federicoiosue / Omni-Notes

Open source note-taking application for Android
https://omninotes.app
GNU General Public License v3.0
2.69k stars 1.11k forks source link

Character count for Chinese/Japanese is incorrect #631

Closed liziwl closed 5 years ago

liziwl commented 5 years ago

Describe the bug Word count error for Chinese simplified/ traditional, Japanese

Context

Expected behavior

  1. Word count: Line 1 -- 6 words; Line 2 -- 6 words, Line 3 -- 12 words, Total: 24 words, 24 characters. For Chinese simplified/ traditional or Japanese, each character is a word. Maybe character count is enough. Or word count only counts characters and excludes space and punctuation.

  2. newline "\n" seems to be wrongly counted in character count.

Screenshots

image

MS word image

Raw text

这是中文测试

這是中文測試

これは日本語のテストです

Additional context Similar issue in similar app: https://github.com/Automattic/simplenote-android/issues/495