all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Sebastian Urban <mrsebastianurban@gmail.com>
Cc: 42602@debbugs.gnu.org
Subject: bug#42602: Wrong (not-)casechars value for "polish" in ispell-dictionary-base-alist
Date: Wed, 29 Jul 2020 21:43:22 +0300	[thread overview]
Message-ID: <83h7tqf9h1.fsf@gnu.org> (raw)
In-Reply-To: <2f58556a-8f0f-f923-2716-5366d66fa44d@gmail.com> (message from Sebastian Urban on Wed, 29 Jul 2020 18:12:02 +0200)

> From: Sebastian Urban <mrsebastianurban@gmail.com>
> Date: Wed, 29 Jul 2020 18:12:02 +0200
> 
> for words like:
>     męski
>     miód
>     klątwa
>     ślad
>     łuk
>     żaba
>     źrebak
>     grzać
>     bańka
> ispell.el sends to Aspell only part of the word, e.g. "lad" instead of
> "ślad", or "kl"/"twa" (depending on the cursor position) instead of
> "klątwa".
> 
> I think this is because wrong value of (NOT-)CASECHARS, which is ASCII
> A-z letters and a few chars of which only ó/Ó is valid for Polish.
> 
> Although, for some reason, it doesn't recognize "ó" in word "miód",
> sending "mi" or "d". It is on the list of CASECHARS under \363, so it
> should work.  Moreover, if I type in regexp-builder "[\363\323]" it
> won't recognize ó/Ó, but it doesn't have a problem with other Polish
> chars, like "ł" ("[\502]") or "ż" ("[\574]").
> 
> If I put in my init.el:
> --8<---------------cut here---------------start------------->8---
> (setq ispell-program-name "C:/cygwin64/bin/aspell")
> (add-hook 'ispell-initialize-spellchecker-hook
>            (lambda ()
>            (add-to-list 'ispell-local-dictionary-alist
>                         '("pl"
>                           ;; "[[:alpha:]]"
>                           ;; "[^[:alpha:]]"
>                           ;; ęóąśłżźćńĘÓĄŚŁŻŹĆŃ
> "[A-Za-z\431\363\405\533\502\574\572\407\504\430\323\404\532\501\573\571\406\503]"
> "[^A-Za-z\431\363\405\533\502\574\572\407\504\430\323\404\532\501\573\571\406\503]"
>                           "[.]" nil nil nil iso-8859-2))))
> (setq ispell-dictionary "pl")
> --8<---------------cut here---------------start------------->8---
> 
> everything seems to work, even ó/Ó are recognised.

I don't understand this change.  Values above octal 377 cannot be
right in the above regexps, because they are supposed to be in Latin-2
encoding, which is a single-byte encoding, and so can only handle
values below octal 400.  How did you come up with those values?

Anyway, I'm quite sure some other factor is at work here.

> Tested on:
> - GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29,
> - GNU Emacs 28.0.50 (build 1, x86_64-w64-mingw32) of 2020-07-05,
> with Aspell from Cygwin installation.

Your Emacs is a native MinGW build, whereas Aspell seems to be a
Cygwin build?  If so, you could have incompatibility in character
encoding.  What is your Windows locale?  And what does

  M-: (getenv "LANG") RET

yield inside Emacs?





  reply	other threads:[~2020-07-29 18:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 16:12 bug#42602: Wrong (not-)casechars value for "polish" in ispell-dictionary-base-alist Sebastian Urban
2020-07-29 18:43 ` Eli Zaretskii [this message]
2020-07-30 11:39   ` Sebastian Urban
2020-07-30 13:26     ` Eli Zaretskii
2020-07-31 10:52       ` Sebastian Urban
2020-08-13  0:07         ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h7tqf9h1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=42602@debbugs.gnu.org \
    --cc=mrsebastianurban@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.