linux - How to add additional charsets to libiconv in Cygwin

07
2014-07
  • Nils-o-mat

    My problem is, that I sometimes have to convert files in the ISO646-DE-encoding (for german authorities... Don't ask...). On each linux-system that I used

    iconv -f ISO8859-1 -t ISO646-DE
    

    worked fine. But in Cygwin I get the message:

    iconv: conversion to ISO646-DE unsupported

    iconv: try 'iconv -l' to get the list of supported encodings

    I looked it up with "iconv -l" and - of course - it wasn't there.

    Is there any way to add a charset or is this just complicated and not worth the effort? Thanks a bunch for your answers!

    Nils

    PS.: I just installed cygwin, so the libraries are steaming new.

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    linux - Cygwin 'grep' in files takes forever
  • IAdapter

    I tried using Cygwin to emulate some cool Linux search feature, and when I do grep in files (12 text files - not big) it takes forever. I used

    grep -rne word
    

    I could find this word faster manually (even without Ctrl + F). Is there any reason this does not work? How to fix it?

    P.S.: I use the Cygwin console.


  • Related Answers
  • grawity

    You forgot to tell grep where to search, so it just sits there waiting for data to be input from 'stdin' – often a pipe, but in this case your keyboard. You can confirm by entering something like "this is a word", Enter, CtrlZ, Enter.

    If you want to search the current directory, recursively, give . as the path.

    grep -rne word .
    

    (Note 2012-07: The latest version of GNU grep will search the current directory automatically if -r is given.)


    In many cases, * will work too, but it is not recommended because 1) it is inefficient – expanding the wildcard to all file names takes some time and might even overflow the permitted command line length; 2) it does not match dotfiles (names starting with a dot) in most shells, although I'm not sure if this applies to expansion done by Cygwin itself.