Compare commits
	
		
			1 Commits
		
	
	
		
			master
			...
			translit-i
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					b5a0918160 | 
							
								
								
									
										10
									
								
								converter.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								converter.go
									
									
									
									
									
								
							@ -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
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user