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
#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