1

I'd like to use hunspell form the command line to spell check a few text files. The files are utf-8 encoded and contain some umlauts and other strange characters.

Some words show up like this

verlä�~_lich

instead of this

verläßlich

I told hunspell to read the files as utf-8 with -i utf-8. I tried to switch the encoding in gnome-terminal. I tried it in xterm and xterm -u8. No success.

It is not a font issue because when I type the strange characters in the terminal they show up fine.

How can I get the strange characters to show up?

1 Answer 1

1

What is the command you are using to run hunspell?

hunspell −d de_DE -i UTF-8 filename

If no luck there,

SET UTF-8

...should go in your affix file. In your case your affix file is probably de_DE.aff.

The default if none is specified is

/usr/share/myspell/default.aff

Hope this helps!

2
  • My affix file contains SET ISO8859-1, if I change it to UTF-8 hunspell gives lots of errors before it even starts to spell check. Different messages but most of them are: This UTF-8 encoding can't convert to UTF-16. I think this is because the affix file simply isn't UTF-8. Aug 6, 2009 at 20:55
  • Ah, some confusion here I think. In your original question you have "The files are utf-8 encoded". If ISO8859-1 has the fewest error's, it's probably what you want. It certainly should support German anyway. Can you post the contents of your affix file to the original question, along with the exact command you're using to run hunspell? Thanks!
    – RJFalconer
    Aug 6, 2009 at 22:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .