Compare commits

...

1 Commits

Author SHA1 Message Date
Donovan Jimenez
b5a0918160 issue #11: calling setlocale at init for TRANSLIT 2014-02-05 14:33:59 -05:00

View File

@ -6,11 +6,21 @@ package iconv
#cgo windows LDFLAGS: -liconv #cgo windows LDFLAGS: -liconv
#include <stdlib.h> #include <stdlib.h>
#include <iconv.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 "C"
import "syscall" import "syscall"
import "unsafe" import "unsafe"
func init() {
C.initLocale()
}
type Converter struct { type Converter struct {
context C.iconv_t context C.iconv_t
open bool open bool