iconv implementation using Win32 API to convert.

Overview
win_iconv is a iconv implementation using Win32 API to convert.

win_iconv is placed in the public domain.

ENVIRONMENT VARIABLE:
    WINICONV_LIBICONV_DLL
        If $WINICONV_LIBICONV_DLL is set, win_iconv uses the DLL.  If
        loading the DLL or iconv_open() failed, falls back to internal
        conversion.  If a few DLL are specified as comma separated list,
        the first loadable DLL is used.  The DLL should have
        iconv_open(), iconv_close() and iconv().  Or libiconv_open(),
        libiconv_close() and libiconv().
        (only available when USE_LIBICONV_DLL is defined at compile time)

Win32 API does not support strict encoding conversion for some codepage.
And MLang function drops or replaces invalid bytes and does not return
useful error status as iconv does.  This implementation cannot be used for
encoding validation purpose.

Yukihiro Nakadaira <[email protected]>
Issues
  • can't work.

    can't work.

    Hello,
    
    I run following C++ routine code with VC 20005 on the Win7 64bit:
    
        const char* in = "Hello";
    
        char out[255]="";
        char* pout = out;
    
        size_t inlen = (size_t)strlen(in), outlen;
    
        iconv_t cd = iconv_open("UTF-8","GBK"); 
    
        size_t retsize = iconv(cd, &in, &inlen, &pout, &outlen);
    
        iconv_close(cd); 
    
        cout<< out <<endl;
    
    
    After the running, the available out still is a empty string.
    
    What should I do for the available out as same as the available in?
    
    

    Original issue reported on code.google.com by [email protected] on 7 Jun 2012 at 9:47

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 8
  • warnings with 64 bits compiler

    warnings with 64 bits compiler

    Using mingw-w64 64 bits compiler, I have those warnings:
    
    win_iconv.c:1194:12: warning: cast from pointer to integer of different size 
    [-Wpointer-to-int-cast]
    win_iconv.c:1196:13: warning: cast to pointer from integer of different size 
    [-Wint-to-pointer-cast]
    win_iconv.c:1204:16: warning: cast to pointer from integer of different size 
    [-Wint-to-pointer-cast]
    win_iconv.c:1207:56: warning: use of C99 long long integer constant 
    [-Wlong-long]
    win_iconv.c:1209:27: warning: cast to pointer from integer of different size 
    [-Wint-to-pointer-cast]
    win_iconv.c:1212:45: warning: cast to pointer from integer of different size 
    [-Wint-to-pointer-cast]
    
    

    Original issue reported on code.google.com by [email protected] on 19 Sep 2011 at 3:38

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 5
  • const char ** vs char ** in iconv function.

    const char ** vs char ** in iconv function.

    glibc iconv and libiconv (and presumably other iconv implementations) use char 
    ** for the second argument to the iconv function.
    
    win-iconv uses const char **, which makes it unnecessarily cumbersome to write 
    code which compiles cleanly using any iconv library (such as cross-platform 
    code).
    
    I would suggest changing the function prototype to match glibc and winiconv 
    (although, const would be more logical, to be frank).
    

    Original issue reported on code.google.com by [email protected] on 3 Aug 2011 at 8:46

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 5
  • Adding missing UCS-2-INTERNAL encoding as an alias of UCS2.

    Adding missing UCS-2-INTERNAL encoding as an alias of UCS2.

    Certain windows installations report their encoding as UCS-2-INTERNAL, which was causing SDL initialization failure when using cygwin's mingw64_64-w64-win-iconv libraries

    See issue #32

    opened by s-daveb 4
  • Reject bytes >= 0x80 when converting from ASCII

    Reject bytes >= 0x80 when converting from ASCII

    Patch taken from GLib (file still under the public domain).

    This behavior is more consistent with other iconv implementations (like GNU libiconv, glibc and Mac OS X).

    opened by nalimilan 4
  • Assumption that sizeof(DWORD)==sizeof(void*) in find_imported_module_by_funcname

    Assumption that sizeof(DWORD)==sizeof(void*) in find_imported_module_by_funcname

    http://code.google.com/p/win-iconv/source/browse/trunk/win_iconv.c#1194
    
    This generates a half-dozen warnings and potentially won't work when compiling 
    for 64 bit windows.
    It'd probably be better to declare base as size_t and change the casts 
    accordingly.
    

    Original issue reported on code.google.com by [email protected] on 3 Aug 2011 at 5:10

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 4
  • maybe uninitialized variable

    maybe uninitialized variable

    compiling with gcc 4.7:
    
    win_iconv.c: In function 'utf32_mbtowc':
    win_iconv.c:1539:52: warning: 'wc' may be used uninitialized in this function 
    [-Wmaybe-uninitialized]
    
    as i don't know the code, i don't know if it's areally a problem, and if yes, 
    what the best fix is.
    

    Original issue reported on code.google.com by [email protected] on 6 Sep 2011 at 1:48

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 3
  • Patch to fix dll name with mingw

    Patch to fix dll name with mingw

    When win-iconv is built with cmake using the mingw cross compiler, the built 
    dll is called libiconv.dll. However, the .def file and the import library still 
    refer to iconv.dll (note the missing lib prefix).
    
    The attached patch fixes the issue by making sure the dll name is iconv.dll 
    even with mingw.
    

    Original issue reported on code.google.com by [email protected] on 20 Jul 2011 at 7:00

    Attachments:

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 3
  • can't be build on rhel-6 with cmake-2.6.4

    can't be build on rhel-6 with cmake-2.6.4

    on rhel-6 the system cmake-2.6.4 which can't build win-iconv. if i build 
    cmake-2.8.4 for rhel-6 then it can build win-iconv, but it'd be useful if the 
    system's default cmake also can build win-iconv without overload system 
    packages (which is always dangerous).
    would ben't be it possible to modify cmake build files to be able to build with 
    cmake-2.6.4 too?
    

    Original issue reported on code.google.com by [email protected] on 19 Jun 2011 at 10:05

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 3
  • Document GLIB_COMPILATION macro

    Document GLIB_COMPILATION macro

    I discovered the GLIB_COMPILATION macro when reading the code, and I found it quite interesting. Would it be possible to add a word about it in the README? Mentioning whether it increases compliance with Unicode would be good.

    It could also be given a more general name, but that's a detail.

    opened by nalimilan 2
  • Issue #8

    Issue #8

    https://github.com/win-iconv/win-iconv/commit/045c6fee3fd911191b93601615e08c3a55425fab

    This broke #8.

    The author claims to add const "as it should be". Well, the standard says otherwise. Even glibc people are pretty serious about keeping it non-const, quoting:

    Ulrich Drepper 2006-08-14 16:30:51 UTC What are you talking about? That patch is completely, utterly wrong. The current code and the manual is correct, there is no problem. The current spec has already been revised with an interpretation request and the first draft of the upcoming spec is fixed. There is no const. Period. Your patch makes the glibc of whatever moron is using it non-compliant.

    At very least, please offer us a #define we can set to make the header export non-const version.

    opened by rr- 2
  • Encoding name

    Encoding name "SHIFFT_JIS"

    https://github.com/win-iconv/win-iconv/blob/9f98392dfecadffd62572e73e9aba878e03496c4/win_iconv.c#L313-L314

    In win_iconv.c, there is "SHIFFT_JIS" and "SHIFFT_JIS-MS". Is this typo?

    opened by N2583ZYOB6 0
  • iconv does not correctly handle Euro-Sign entered in CP1252 -> iso-8859-1//TRANSLIT

    iconv does not correctly handle Euro-Sign entered in CP1252 -> iso-8859-1//TRANSLIT

    What steps will reproduce the problem?
    create a file euro.txt containing a bare Euro sign (€) Hex 80 on a line and 
    run
    
    win_iconv -c -f CP1252 -t iso-8859-1//TRANSLIT euro.txt
    
    What is the expected output? (verified with Linux SLES 11-SP3)
    EUR
    
    What do you see instead? 
    ?
    
    Redirected to a file that file contains: Hex 3F
    
    This would be correct for iso-8859-15.
    
    What version of the product are you using? On what operating system?
    win_iconv from win-iconv-0.06-bin.zip dated 21.10.2012 
    on Windows 7 32bit SP1
    
    Please provide any additional information below.
    
    

    Original issue reported on code.google.com by [email protected] on 19 May 2014 at 2:19

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 1
  • win-iconv should use the GNU iconv test suite

    win-iconv should use the GNU iconv test suite

    Hello.
    
    I am a member of the ReactOS project (www.reactos.org) and we are interested in 
    your project.
    
    Some of the dependencies that our project relies on depends on an iconv 
    implementation. The fact that win-iconv is based on WIN32 API without any other 
    dependency and its light weight make it very appealing to us.
    
    However, we need some quality insurance to ensure that the use of your library 
    will be transparent to software programmed mostly against the GNU 
    implementation (www.gnu.org/software/libiconv/). That's why we would like 
    win-iconv to be tested against their test suite.
    
    Of course, we are ready to contribute in any way needed to get this done.
    
    Regards.
    Jérôme
    

    Original issue reported on code.google.com by [email protected] on 7 Dec 2012 at 9:54

    Type-Defect Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 1
Releases(v0.0.8)
Tiny blocker of Windows tracking and telemetry written in plain C++/Win32 API.

Tiny blocker of Windows tracking and telemetry written in plain C++/Win32 API. Just run once as admin and forget. No questions asked. No harmful actions performed like other Windows spying blockers try.

null 5 Mar 30, 2022
A simple thread-safe implementation of runtime obfuscation for Win32 applications.

Thread-Safe Win32 Runtime Obfuscation A simple thread-safe implementation of runtime obfuscation for Win32 applications. The main use case for this is

Daniel 1 Mar 6, 2022
GameBoy emulator with debugger written in C++ using Win32 and SDL2

脳(のう)腐(ふ) DMG-01 emulator written in modern C++ using Win32 API and SDL2. It is intended as a hobby project to sharpen my C++ skills. The emulator is

Jimmy Yang 20 Jul 27, 2022
Small program using GMP to convert a decimal number (1.8) into a reduced fraction (9/5)

gmp_rationalize This is a small program to convert a decimal number (like 1.8) into a reduced fraction (like 9/5), using GMP for handling arbitrary-pr

null 3 Apr 5, 2022
Jittey - A public domain text editor written in C and Win32

Jittey (Jacob's Terrific Text Editor) is a single-file basic text editor written in pure C and Win32, there is no real reason to use it, but it

Jakub Šebek 24 Aug 7, 2022
Easily hook WIN32 x64 functions

About Library for easy hooking of arbitrary functions in WIN32 x64 executables. Only requires target function address. Disassembles the function prolo

tcpie 17 Jun 12, 2022
Acrylic effect for all existing Win32 context menus

AcrylicMenus This is a proof-of-concept tiny application that applies acrylic effect to almost all existing Win32 context menus on Windows 10 and Wind

null 279 Aug 8, 2022
A LoadLibrary injector for CS:GO that automatically bypasses Trusted Mode by disabling various Win32 function hooks.

TrustedInjector This is a LoadLibrary injector for Counter-Strike: Global Offensive. Information It automatically bypasses trusted mode by removing ho

Brandon 18 Jul 17, 2022
Vaca - An experimental Win32 wrapper for C++ to develop GUI programs

Vaca Visual Application Components Abstraction Copyright (c) 2005-2012 David Capello All rights reserved. Vaca is a library to develop GUI application

David Capello 61 Jul 26, 2022
A tool to apply accent color to win32 controls.

AccentApplicator A tool to apply accent color to win32 controls. Works with Windows 10 only. Overall Progress Controls Button Checkbox Combobox Edit T

Rounak 14 Jun 17, 2022
In DFS-BFS Implementation In One Program Using Switch Case I am Using an Simple And Efficient Code of DFS-BFS Implementation.

DFS-BFS Implementation-In-One-Program-Using-Switch-Case-in-C Keywords : Depth First Search(DFS), Breadth First Search(BFS) In Depth First Search(DFS),

Rudra_deep 1 Nov 17, 2021
Convert LLVM coverage information into HTML reports

llvm-coverage-to-html converter The clang compiler supports source based coverage tracking, but the default reporting options are very basic. This too

Thomas Neumann 2 Oct 11, 2021
POC tool to convert CobaltStrike BOF files to raw shellcode

BOF2Shellcode POC tool to convert a Cobalt Strike BOF into raw shellcode. Introduction This code was written as part of a blog tutorial on how to conv

FalconForce 55 Aug 5, 2022
Convert Javascript/TypeScript to C

Convert Javascript/TypeScript to C

Andrei Markeev 1.1k Jul 27, 2022
cbmconvert: create, extract and convert 8-bit Commodore binary archives

cbmconvert: create, extract and convert 8-bit Commodore binary archives cbmconvert extracts files from most known archive file formats that are used o

Marko Mäkelä 6 Feb 5, 2022
Resize, crop, and convert images on Upload.

Upload Image Plugin Resize, crop, and convert images on Upload. To use this plugin use the following settings in a "Transformation Step" in the Upload

Upload.js 20 Mar 31, 2022
pluggable tool to convert an unrolled TritonAST to LLVM-IR, optimize it and get back to TritonAST

it is fork from https://github.com/fvrmatteo/TritonASTLLVMIRTranslator *WARNINGS: tested only linux(ubuntu 20.04) and only llvm and clang version 10*

pr4gasm 5 Jun 10, 2022
A tool to convert Call of Duty XBIN/EXPORT files to and from each other.

exportxbin exportxbin is an enhanced version of export2bin included in the Call of Duty: Black Ops III Mod Tools. Its main goal is to provide users wi

Philip 3 Jan 22, 2022
Tiny project to convert a .ase to a RGBA Byte array

Tiny project to convert a .ase to a RGBA Byte array

Stephen Ma 3 Apr 6, 2021