issue #11: calling setlocale at init for TRANSLIT

This commit is contained in:
Donovan Jimenez 2014-02-05 14:33:59 -05:00
parent 5f6a5a4f00
commit b5a0918160

View File

@ -6,11 +6,21 @@ package iconv
#cgo windows LDFLAGS: -liconv
#include <stdlib.h>
#include <iconv.h>
#include <locale.h>
// called by init, seems to be necessary for TRANSLIT to work
void initLocale() {
setlocale(LC_ALL, "");
}
*/
import "C"
import "syscall"
import "unsafe"
func init() {
C.initLocale()
}
type Converter struct {
context C.iconv_t
open bool