libtconv-0.1 manual
tconv_set_ienc
void tconv_set_ienc(tconv *tcP, const char *iEncP);
declared in tconv.h, include tconv.h

tcP handle for an existing tconv instance,
iEncP handle for valid C locale, optional.

Function takes new input character set encoding to be used in future tasks. It does not validate whether it is valid for given operating system or not. It can be used in cases when converting between many different character formats, with use of a single tconv instance or when the tconv instance was created without initial encoding provided. The string for iEncP must be a valid C locale (LC_CTYPE) for the operating system, where this library is about to be used.

There is no value returned.

Example
/* C source */

#include "tconv.h"

void main(){
  tconv *tcP;

  tcP = tconv_init(NULL,NULL);
  /* no encoding set */

  tconv_set_ienc(tcP, "en_US.iso_8859-1");
  /* do some input-encoding based job */

  tconv_free(tcP); 
}
Copyright 2015 TinyIT All rights reserved
Last modified 2015-06-04