doomemacs / doomemacs/core

Flyspell iconv_open error when using hunspell multi dict

Open
#5,475 6 comments 0 reactions 0 assignees View on GitHub
is:bug needs-triage
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### What did you expect to happen?

Flyspell is enabled normally.

### What actually happened?

Error enabling Flyspell. The following is from the Messages buffer:
```
Starting new Ispell process hunspell with en_US,pt_BR dictionary...done
Error enabling Flyspell mode:
(error - iconv_open: NIL -> UTF-8
error - iconv_open: UTF-8 -> NIL
@(#) International Ispell Version 3.2.06 (but really Hunspell 1.7.0))
```
These are my spell checker customizations from config.el:
```
;; Spell Checking Customizations
(with-eval-after-load "ispell"
(setq ispell-program-name "hunspell")
(setq ispell-dictionary "en_US,pt_BR")
(ispell-set-spellchecker-params)
(ispell-hunspell-add-multi-dic "en_US,pt_BR")
(setq ispell-personal-dictionary "~/.hunspell_personal"))
```

![image](https://user-images.githubusercontent.com/88800993/133186348-2eb43a14-d7f0-4b2a-b215-80246682b63c.png)

### Describe your attempts to resolve the issue

I thought it could be an issue with the Unicode module (which I already deactivated) or related to the font I'm using (Fira Code), but it persisted after changing to Hack. Also changed the file encoding to iso-latin-1, to no avail. I hit a dead end after taking a look at flyspell.el.gz, where I found this block of code:
` (if flyspell-mode
(condition-case err
(flyspell-mode-on)
(error (message "Error enabling Flyspell mode:\n%s" (cdr err))
(flyspell-mode -1)))
(flyspell-mode-off)))`

I have no idea where to search for the origin of "err".

### Steps to reproduce

1. Set ispell-hunspell-add-multi-dic.
2. Open a file where Ispell and Flycheck are supposed to be enabled

### System Information

https://pastebin.com/G1dx4RNv

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.