zoukankan      html  css  js  c++  java
  • 移植到windows下的iconv

    This is a short memo about installing iconv on Windows host (specifically: Windows 7 SP1 x64). Iconv is a handy Unix/Linux tool that is used for conversion between different character encodings.
    Unfortunately, I’m not always in a position to use my favorite Linux distro at job, so here is a short recipe on how to setup iconv port for Win32.

      1. Download libiconv-1.9.1.bin.woe32.zip from Sourgeforge.net
      2. Download support library gettext-runtime-0.13.1.bin.woe32.zip from here. Make sure that you download exactly the version 0.13.1 and NOT newer, due to some compatibility issues!
      3. Create some directory, such as C:UNIXUTILiconv
      4. Unzip the content of in from both zip files and save the content together in above directory.

    The final content of iconv directory should look like this:

    C:UNIXUTILiconv>dir
     Volume in drive C has no label.
     Volume Serial Number is A88E-6A42
     
     Directory of C:UNIXUTILiconv
     
    11.10.2012  13:33    <DIR>          .
    11.10.2012  13:33    <DIR>          ..
    14.01.2004  21:59            28.672 asprintf.dll
    14.01.2004  01:56            24.576 charset.dll
    14.01.2004  21:59            20.480 envsubst.exe
    14.01.2004  21:59            20.480 gettext.exe
    07.10.2003  21:17             2.715 gettext.sh
    14.01.2004  01:56           892.928 iconv.dll
    14.01.2004  01:56            16.384 iconv.exe
    14.01.2004  21:59            45.056 intl.dll
    14.01.2004  21:59            20.480 ngettext.exe
                  11 File(s)      1.071.780 bytes
                   2 Dir(s)  57.396.654.080 bytes free
     
    C:UNIXUTILiconv>

    Usage:

    C:UNIXUTILiconv>iconv --help
    Usage: iconv [--binary] [-c] [-s] [-f fromcode] [-t tocode] [file ...]
    or:    iconv -l

    List of supported code pages:

    C:UNIXUTILiconv>iconv -l

    Example of converting file from utf-8 to cp1250 encoding:

    C:UNIXUTILiconv>iconv -f utf-8 -t cp1250 utf-8.txt > cp1250.txt
  • 相关阅读:
    nginx教程2:日志
    3.1.1 基于监听的事件处理机制
    示例(1)按键和文本框监听
    2.3.3 Button(按钮)与ImageButton(图像按钮)
    2.3.2 EditText(输入框)详解
    2.3.1 TextView(文本框)详解
    2.2.3 TableLayout(表格布局)
    2.2.2 RelativeLayout(相对布局)
    2.2.1 LinearLayout(线性布局)
    2.1 View与ViewGroup的概念
  • 原文地址:https://www.cnblogs.com/foohack/p/7797474.html
Copyright © 2011-2022 走看看