What's the simplest way to process files with UTF-8 characters in groff on macOS? I require Polish diacritics, such as ą, ć, ę, etc. 

Of course, I can always pre-process the file to replace UTF-8 characters with escaped characters but that's not elegant.
As of today, macOS Mojave ships with a quite outdated version of groff (1.19 or something...) which apparently cannot handle the -K option. Thus it fails to recognise any fancy diacritics (german umlauts in my case), if you run groff -Kutf8 .... 

You can get a newer version of groff on macOS by installing it via Homebrew, as per this post

brew install groff gs


(not sure if gs for ghostscript is actually required; I installed it anyway)