borkdude / flycheck-clj-kondo

Emacs integration for clj-kondo via flycheck
94 stars 17 forks source link

Issue with fly checking non-ascii clojure code (mostly) on MS-Windows #16

Closed ikappaki closed 2 years ago

ikappaki commented 2 years ago

Hi,

there is an issue with flycheck clj kondo on MS-Windows, that can prevent it from recognising UTF-8 characters out of the ASCII range, mostly affecting MS-Windows out of the box. The non-ASCII chars are likely to be recognised as spaces by clj-kondo and thus generating false positive errors or warnings:

image

To reproduce

  1. Open a stock Emacs instance on MS-Windows.
  2. open a new clojure file with flycheck-mode enabled, and type some unicode text such as (def x 'δύο).

The linter will complain about the definition. In the above example, although we created a symbol with unicode chars, they are received as spaces by clj-kondo and thus the complain :quote node expects 1 value..

This is related to the codepage Emacs is using for encoding the data to clj-kondo and back (see bugs#52816 for some info).

PR to follow.