[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/spell-fu 86d46cf63e 37/86: fix: encode word to utf8
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/spell-fu 86d46cf63e 37/86: fix: encode word to utf8 |
Date: |
Thu, 7 Jul 2022 12:03:41 -0400 (EDT) |
branch: elpa/spell-fu
commit 86d46cf63e858f17e83e36e2574b06fb1403bc1f
Author: R0flcopt3r <12752060+R0flcopt3r@users.noreply.github.com>
Commit: R0flcopt3r <12752060+R0flcopt3r@users.noreply.github.com>
fix: encode word to utf8
This solves issues where non-ascii characters are marked as incorrect.
This is only tested with the norwegian characters: æ, ø, å.
Contents of `spell-fu--cache-table`
```lisp
(let ((result '()))
(dolist (x (hash-table-keys spell-fu--cache-table))
(when (string-match-p "^h..r$" x)
(push x result)))
result)
=> ("h\303\270r" "h\303\246r" "h\303\245r" ... "haar")
```
Using `encode-coding-string` the norwegian characters are properly
encoded to the same as in the table:
```lisp
(encode-coding-string "æ ø å" 'utf-8)
=> "\303\246 \303\270 \303\245"
```
fixes #8
---
spell-fu.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spell-fu.el b/spell-fu.el
index f5e5a3d612..0a16b44c05 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -463,7 +463,7 @@ range POINT-START to POINT-END. Otherwise remove all
overlays."
Marking the spelling as incorrect using `spell-fu-incorrect-face' on failure.
Argument POINT-START the beginning position of WORD.
Argument POINT-END the end position of WORD."
- (unless (gethash (downcase word) spell-fu--cache-table nil)
+ (unless (gethash (encode-coding-string (downcase word) 'utf-8)
spell-fu--cache-table nil)
;; Ignore all uppercase words.
(unless (equal word (upcase word))
(spell-fu-mark-incorrect point-start point-end))))
- [nongnu] elpa/spell-fu 1159eeec13 63/86: Fix including trailing single-quote in the word, (continued)
- [nongnu] elpa/spell-fu 1159eeec13 63/86: Fix including trailing single-quote in the word, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 32fcbd9e8e 68/86: Initial changes for multiple dictionaries, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 1f3e5b8f05 72/86: readme: Fix typos, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 2f2fd6de00 83/86: Change URL to codeberg, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 00b75e5741 25/86: Cleanup: docstring, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 1bc18879b6 27/86: Add license file, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu d0700095ea 28/86: Add header to cache loading & error checking for cache content, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu f6c849f860 30/86: Fix disabling spell-fu when used without a timer, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 502d523b46 31/86: Fix unintended modification of the standard syntax table, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu e62cfc4f08 34/86: Add support for personal dictionary management, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 86d46cf63e 37/86: fix: encode word to utf8,
ELPA Syncer <=
- [nongnu] elpa/spell-fu 9180a77865 48/86: Fix #15: don't enable (when used globally) for application buffers, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 41a133d119 52/86: Fix #16: Fails to spellcheck when whitespace-mode splits a word, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 7c2542e109 73/86: Merge branch 'multiple-dictionaries' into 'master', ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 50be652a6e 77/86: Fix overlay faces masking other faces (when checking faces-at-point), ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu cbe5cd84c3 86/86: Correct URL, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 41a7ebcbab 23/86: Cleanup: replace cl-letf with advice macro, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 251e63eacc 29/86: readme: update, clarify TODO, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu ad139f6fac 40/86: Cleanup: quiet checkdoc warning, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 2caa9fc6f0 44/86: Update changelog, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu f38bebefea 62/86: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07