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:\UNIXUTIL\iconv
    4. Unzip the content of \bin from both zip files and save the content together in above directory.

The final content of iconv directory should look like this:

C:\UNIXUTIL\iconv>dir
 Volume in drive C has no label.
 Volume Serial Number is A88E-6A42
 
 Directory of C:\UNIXUTIL\iconv
 
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:\UNIXUTIL\iconv>

Usage:

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

List of supported code pages:

C:\UNIXUTIL\iconv>iconv -l

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

C:\UNIXUTIL\iconv>iconv -f utf-8 -t cp1250 utf-8.txt > cp1250.txt

移植到windows下的iconv的更多相关文章

  1. 使用cygwin移植Linux的项目到Windows下之总结(转)

    使用cygwin移植Linux的项目到Windows下之总结(转) 原文 http://my.oschina.net/michaelyuanyuan/blog/68615?p=1   一.why   ...

  2. 在Linux下和Windows下遍历目录的方法及如何达成一致性操作

    最近因为测试目的需要遍历一个目录下面的所有文件进行操作,主要是读每个文件的内容,只要知道文件名就OK了.在Java中直接用File类就可以搞定,因为Java中使用了组合模式,使得客户端对单个文件和文件 ...

  3. LEDAPS1.3.0版本移植到windows平台----HuPm参数初始化模块

    这个是2012年左右放在百度空间的,谁知百度空间关闭...转移到博客园. 最近项目用到3.1.2版本的LEDAPS,新版本的使用情况会在后续文章中慢慢丰富. LEDAPS的调用顺序是:HuPm--&g ...

  4. LEDAPS1.3.0版本移植到windows平台----HuSr大气校正模块

    这个是2012年左右放在百度空间的,谁知百度空间关闭...转移到博客园. 最近项目用到3.1.2版本的LEDAPS,新版本的使用情况会在后续文章中慢慢丰富. HuSr是将LEDAPS项目中的TM/ET ...

  5. LEDAPS1.3.0版本移植到windows平台----HuCsm云掩膜模块

    这个是2012年左右放在百度空间的,谁知百度空间关闭...转移到博客园. 最近项目用到3.1.2版本的LEDAPS,新版本的使用情况会在后续文章中慢慢丰富. HuCsm是将LEDAPS项目中的TM/E ...

  6. LEDAPS1.3.0版本移植到windows平台----HuCal定标模块

    这个是2012年左右放在百度空间的,谁知百度空间关闭...转移到博客园. 最近项目用到3.1.2版本的LEDAPS,新版本的使用情况会在后续文章中慢慢丰富. HuCal是将LEDAPS项目中的TM/E ...

  7. Windows下OpenFOAM开发及使用环境配置指南 (1)【转载】

    转载自:http://openfoam.blog.sohu.com/158614863.html *************************************************** ...

  8. Windows下解析命令行参数

    linux通常使用GNU C提供的函数getopt.getopt_long.getopt_long_only函数来解析命令行参数. 移植到Windows下 getopt.h #ifndef _GETO ...

  9. Windows下将ImageMagick移植到Android平台

    Windows下将ImageMagick移植到Android平台 原文链接  http://www.pedant.cn/2014/06/18/imagemagick-ported-android/ I ...

随机推荐

  1. 数据库实例: STOREBOOK > 用户 > 编辑 用户: SYSMAN

    ylbtech-Oracle:数据库实例: STOREBOOK  >  用户  >  编辑 用户: SYSMAN 编辑 用户: SYSMAN 1. 一般信息返回顶部 1.1,   1.2, ...

  2. DOS批处理中%cd%和%~dp0的异同分析

    在DOS的批处理中,有时候需要知道当前的路径.在DOS中,有两个环境变量可以跟当前路径有关,一个是%cd%, 一个是%~dp0. 这两个变量的用法和代表的内容是不同的. 1. %cd% 可以用在批处理 ...

  3. pytorch之dataloader深入剖析

    PyTorch学习笔记(6)——DataLoader源代码剖析 - dataloader本质是一个可迭代对象,使用iter()访问,不能使用next()访问: - 使用iter(dataloader) ...

  4. 整合spring cloud云架构 - SSO单点登录之OAuth2.0登录认证(1)

    之前写了很多关于spring cloud的文章,今天我们对OAuth2.0的整合方式做一下笔记,首先我从网上找了一些关于OAuth2.0的一些基础知识点,帮助大家回顾一下知识点: 一.oauth中的角 ...

  5. linux下elasticsearch 安装、配置及示例

    简介 开始学es,我习惯边学边记,总结出现的问题和解决方法.本文是在两台linux虚拟机下,安装了三个节点.本次搭建es同时实践了两种模式——单机模式和分布式模式.条件允许的话,可以在多台机器上配置e ...

  6. Hadoop:开发机运行spark程序,抛出异常:ERROR Shell: Failed to locate the winutils binary in the hadoop binary path

    问题: windows开发机运行spark程序,抛出异常:ERROR Shell: Failed to locate the winutils binary in the hadoop binary ...

  7. VS2008 解决Unable to copy file 对路径的访问被拒绝。

    在VS2008 + WINDOWS 7 环境下重新生成解决方案时遇到以下问题 Unable to delete file "F:\XX.exe". 对路径"F:\XX.e ...

  8. CMenu and Dialog-based applications

    [问] Is it possible to put a menu in a dialog based application? How? [答] Yes, it is possible to add ...

  9. Provider Pattern for Beginners in .net

    Download ProviderPattern.zip Introduction Provider pattern allows the developers to create pluggable ...

  10. 命令行下的html转pdf工具wkhtmltopdf

    基于webkit和qt的html转pdf的命令行工具,非常好使 http://code.google.com/p/wkhtmltopdf/ http://www.cnblogs.com/shanyou ...