Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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!

share|improve this answer
    
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. –  Ludwig Weinzierl Aug 6 '09 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 '09 at 22:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.