|
31 | 31 | * ENHANCEMENTS, OR MODIFICATIONS.
|
32 | 32 | *
|
33 | 33 | * IDENTIFICATION
|
34 |
| - * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.56 2002/06/15 19:54:24 momjian Exp $ |
| 34 | + * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.57 2002/07/18 04:16:07 ishii Exp $ |
35 | 35 | *
|
36 | 36 | **********************************************************************/
|
37 | 37 |
|
|
65 | 65 |
|
66 | 66 | #include"mb/pg_wchar.h"
|
67 | 67 |
|
68 |
| -staticpg_enconv*tcl_enconv; |
69 |
| - |
70 | 68 | staticunsignedchar*
|
71 | 69 | utf_u2e(unsignedchar*src)
|
72 | 70 | {
|
73 |
| -returnpg_do_encoding_conversion(src,strlen(src), |
74 |
| -NULL,tcl_enconv->from_unicode); |
| 71 | +returnpg_do_encoding_conversion(src,strlen(src),PG_UNICODE,GetDatabaseEncoding()); |
75 | 72 | }
|
76 | 73 |
|
77 | 74 | staticunsignedchar*
|
78 | 75 | utf_e2u(unsignedchar*src)
|
79 | 76 | {
|
80 |
| -returnpg_do_encoding_conversion(src,strlen(src), |
81 |
| -tcl_enconv->to_unicode,NULL); |
| 77 | +returnpg_do_encoding_conversion(src,strlen(src),GetDatabaseEncoding(),PG_UNICODE); |
82 | 78 | }
|
83 | 79 |
|
84 | 80 | #definePLTCL_UTF
|
@@ -211,14 +207,6 @@ pltcl_init_all(void)
|
211 | 207 | if (!pltcl_firstcall)
|
212 | 208 | return;
|
213 | 209 |
|
214 |
| -#ifdefPLTCL_UTF |
215 |
| -/************************************************************ |
216 |
| - * Do unicode conversion initialization |
217 |
| - ************************************************************/ |
218 |
| - |
219 |
| -tcl_enconv=pg_get_enconv_by_encoding(GetDatabaseEncoding()); |
220 |
| -#endif |
221 |
| - |
222 | 210 | /************************************************************
|
223 | 211 | * Create the dummy hold interpreter to prevent close of
|
224 | 212 | * stdout and stderr on DeleteInterp
|
|