msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.29k stars 1.22k forks source link

mingw-w64-x86_64-hunspell path to personal dictionary incorrect #8507

Open guraltsev opened 3 years ago

guraltsev commented 3 years ago

I have msys2 with

Name            : mingw-w64-x86_64-hunspell
Version         : 1.7.0-5

If I try to add a file to my personal dictionary by running:

$ hunspell -a
  * supercalifragilisticexpialidocious
  #

it creates the file %USERPROFILE%hunspell_en_US in my home directory. This is not what should be happening.

naveen521kk commented 3 years ago

This is not what should be happening.

What should happen then?

guraltsev commented 3 years ago

The file created should be something along the lines of C:\Users\username\.hunspell_en_US. The problem seems to be that the variable %USERPROFILE% does not get expanded.

Biswa96 commented 3 years ago

How can I reproduce your issue? Any way to create dummy files. Here is my output:

$ hunspell.exe -a
Can't open affix or dictionary files for dictionary named "en_US".
guraltsev commented 3 years ago
guraltsev commented 3 years ago

Possible related bug: Without doing any of the above hunspell -D declares that one of the paths it is searching for dictionaries is:

%USERPROFILE%/Application Data/OpenOffice.org 2/user/wordbook

It seems it is not expanding the value of %USERPROFILE% here either

Biswa96 commented 3 years ago

Weird! In my case, /mingw64/share/hunspell dictionary search path works but no .hunspell_en_US file is created, neither in %USERPROFILE% nor in $HOME.

guraltsev commented 3 years ago

I do have the $HOME environment variable set in windows to be explicitly C:\Users\guraltsev\ Before I had it set to %USERPROFILE and the effect was the same.

Could you post the output of hunspell-D on your system? Mine gives:

SEARCH PATH:
.;C:/tools/msys64/mingw64/bin/;C:\Users\guraltsev\AppData\Roaming\hunspell\;C:/tools/msys64/mingw64/share/hunspell;C:/tools/msys64/mingw64/share/myspell;C:/tools/msys64/mingw64/share/myspell/dicts;C:/tools/msys64;%USERPROFILE%/Application Data/OpenOffice.org 2/user/wordbook;C:/tools/msys64/mingw64/share/dict/ooo;
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
C:\Users\guraltsev\AppData\Roaming\hunspell\/en_AU
C:\Users\guraltsev\AppData\Roaming\hunspell\/en_CA
C:\Users\guraltsev\AppData\Roaming\hunspell\/en_GB
C:\Users\guraltsev\AppData\Roaming\hunspell\/en_US
C:\Users\guraltsev\AppData\Roaming\hunspell\/en_ZA
C:\Users\guraltsev\AppData\Roaming\hunspell\/hyph_en_GB
Biswa96 commented 3 years ago
Click here to see the output ``` $ hunspell -D SEARCH PATH: .;F:/msys64/ucrt64/bin/;F:/msys64/ucrt64/share/hunspell;F:/msys64/ucrt64/share/myspell;F:/msys64/ucrt64/share/myspell/dicts;F:/msys64;%USERPROFILE%/Application Data/OpenOffice.org 2/user/wordbook;F:/msys64/ucrt64/share/dict/ooo; AVAILABLE DICTIONARIES (path is not mandatory for -d option): F:/msys64/ucrt64/share/hunspell/en_AG F:/msys64/ucrt64/share/hunspell/en_AU-large F:/msys64/ucrt64/share/hunspell/en_AU F:/msys64/ucrt64/share/hunspell/en_BS F:/msys64/ucrt64/share/hunspell/en_BW F:/msys64/ucrt64/share/hunspell/en_BZ F:/msys64/ucrt64/share/hunspell/en_CA F:/msys64/ucrt64/share/hunspell/en_DK F:/msys64/ucrt64/share/hunspell/en_GB F:/msys64/ucrt64/share/hunspell/en_GH F:/msys64/ucrt64/share/hunspell/en_HK F:/msys64/ucrt64/share/hunspell/en_IE F:/msys64/ucrt64/share/hunspell/en_IN F:/msys64/ucrt64/share/hunspell/en_JM F:/msys64/ucrt64/share/hunspell/en_NA F:/msys64/ucrt64/share/hunspell/en_NG F:/msys64/ucrt64/share/hunspell/en_NZ F:/msys64/ucrt64/share/hunspell/en_PH F:/msys64/ucrt64/share/hunspell/en_SG F:/msys64/ucrt64/share/hunspell/en_TT F:/msys64/ucrt64/share/hunspell/en_US-large F:/msys64/ucrt64/share/hunspell/en_US F:/msys64/ucrt64/share/hunspell/en_ZA F:/msys64/ucrt64/share/hunspell/en_ZW F:/msys64/ucrt64/share/myspell/dicts/en_AG F:/msys64/ucrt64/share/myspell/dicts/en_AU-large F:/msys64/ucrt64/share/myspell/dicts/en_AU F:/msys64/ucrt64/share/myspell/dicts/en_BS F:/msys64/ucrt64/share/myspell/dicts/en_BW F:/msys64/ucrt64/share/myspell/dicts/en_BZ F:/msys64/ucrt64/share/myspell/dicts/en_CA F:/msys64/ucrt64/share/myspell/dicts/en_DK F:/msys64/ucrt64/share/myspell/dicts/en_GB F:/msys64/ucrt64/share/myspell/dicts/en_GH F:/msys64/ucrt64/share/myspell/dicts/en_HK F:/msys64/ucrt64/share/myspell/dicts/en_IE F:/msys64/ucrt64/share/myspell/dicts/en_IN F:/msys64/ucrt64/share/myspell/dicts/en_JM F:/msys64/ucrt64/share/myspell/dicts/en_NA F:/msys64/ucrt64/share/myspell/dicts/en_NG F:/msys64/ucrt64/share/myspell/dicts/en_NZ F:/msys64/ucrt64/share/myspell/dicts/en_PH F:/msys64/ucrt64/share/myspell/dicts/en_SG F:/msys64/ucrt64/share/myspell/dicts/en_TT F:/msys64/ucrt64/share/myspell/dicts/en_US-large F:/msys64/ucrt64/share/myspell/dicts/en_US F:/msys64/ucrt64/share/myspell/dicts/en_ZA F:/msys64/ucrt64/share/myspell/dicts/en_ZW ```
guraltsev commented 1 year ago

This is still a bug on

Hunspell 1.7.1