|
1 | 1 | /* |
2 | | - * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
@@ -103,22 +103,6 @@ utfInitialize(void) |
103 | 103 | } |
104 | 104 | } |
105 | 105 |
|
106 | | -/* |
107 | | - * Terminate all utf processing |
108 | | - */ |
109 | | -static void |
110 | | -utfTerminate(void) |
111 | | -{ |
112 | | - if ( iconvFromPlatform!=(iconv_t)-1 ) { |
113 | | - (void)iconv_close(iconvFromPlatform); |
114 | | - } |
115 | | - if ( iconvToPlatform!=(iconv_t)-1 ) { |
116 | | - (void)iconv_close(iconvToPlatform); |
117 | | - } |
118 | | - iconvToPlatform = (iconv_t)-1; |
119 | | - iconvFromPlatform = (iconv_t)-1; |
120 | | -} |
121 | | - |
122 | 106 | /* |
123 | 107 | * Do iconv() conversion. |
124 | 108 | * Returns length or -1 if output overflows. |
@@ -176,16 +160,6 @@ utf8ToPlatform(char *utf8, int len, char *output, int outputMaxLen) |
176 | 160 | return iconvConvert(iconvToPlatform, utf8, len, output, outputMaxLen); |
177 | 161 | } |
178 | 162 |
|
179 | | -/* |
180 | | - * Convert Platform Encoding to UTF-8. |
181 | | - * Returns length or -1 if output overflows. |
182 | | - */ |
183 | | -static int |
184 | | -platformToUtf8(char *str, int len, char *output, int outputMaxLen) |
185 | | -{ |
186 | | - return iconvConvert(iconvFromPlatform, str, len, output, outputMaxLen); |
187 | | -} |
188 | | - |
189 | 163 | int |
190 | 164 | convertUft8ToPlatformString(char* utf8_str, int utf8_len, char* platform_str, int platform_len) { |
191 | 165 | if (iconvToPlatform == (iconv_t)-1) { |
|
0 commit comments