File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -13,34 +13,34 @@ const char *Convert(const char *input, const char *config) {
13
13
strcat (configFile , config );
14
14
strcat (configFile , ".json" );
15
15
16
- opencc_t p = opencc_new (configFile );
17
- char * out = opencc_convert (p , input );
16
+ opencc_t p = opencc_open (configFile );
17
+ char * out = opencc_convert_utf8 (p , input , strlen ( input ) );
18
18
out [strlen (input )] = '\0' ;
19
19
20
- opencc_delete (p );
20
+ opencc_close (p );
21
21
22
22
return out ;
23
23
}
24
24
25
25
void Convert_free_string (char * p ) {
26
- opencc_free_string (p );
26
+ opencc_convert_utf8_free (p );
27
27
}
28
28
29
29
void * Opencc_New (const char * configFile ) {
30
- return opencc_new (configFile );
30
+ return opencc_open (configFile );
31
31
}
32
32
33
33
void Opencc_Delete (void * id ) {
34
- opencc_delete (id );
34
+ opencc_close (id );
35
35
}
36
36
37
37
const char * Opencc_Convert (void * id , const char * input ) {
38
- char * output = opencc_convert (id , input );
38
+ char * output = opencc_convert_utf8 (id , input , strlen ( input ) );
39
39
output [strlen (input )] = '\0' ;
40
40
return output ;
41
41
}
42
42
43
43
void Opencc_Free_String (char * p ) {
44
- opencc_free_string (p );
44
+ opencc_convert_utf8_free (p );
45
45
}
46
46
You can’t perform that action at this time.
0 commit comments