Skip to content

Commit e5920b0

Browse files
committed
Update include/cppp/reiconv.hpp.in.
修改: include/cppp/reiconv.hpp.in
1 parent c611043 commit e5920b0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

include/cppp/reiconv.hpp.in

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
#ifndef _CPPP_REICONV_HPP
2121
#define _CPPP_REICONV_HPP
2222

23+
#ifdef _MSC_VER
24+
/* Use UTF-8 to decode this file. */
25+
#pragma execution_character_set("utf-8")
26+
#endif
27+
2328
#include <iostream>
2429
#include <time.h>
2530
#include <errno.h>
@@ -31,10 +36,10 @@ extern "C++"
3136
{
3237
namespace cppp{namespace base{namespace reiconv
3338
{
34-
extern @DLL_VARIABLE@ int reiconv_version; /* Likewise */
39+
extern @DLL_VARIABLE@ int reiconv_version; /* Version info */
3540

3641
#undef iconv_t
37-
/* Define iconv_t ourselves. */
42+
/* Identifier for conversion method from one codeset to another. */
3843
typedef void* iconv_t;
3944

4045
#undef iconv_open
@@ -167,7 +172,7 @@ extern "C++"
167172
*
168173
* Converts a memory region given in encoding FROMCODE to a new memory
169174
* region in encoding TOCODE. FROMCODE and TOCODE are as for iconv_open(3),
170-
* except that FROMCODE may be one of the values
175+
* except that FROMCODE may be one of the values when enabled extra features
171176
* "autodetect_utf8" supports ISO-8859-1 and UTF-8
172177
* "autodetect_jp" supports EUC-JP, ISO-2022-JP-2 and SHIFT_JIS
173178
* "autodetect_kr" supports EUC-KR and ISO-2022-KR
@@ -183,7 +188,7 @@ extern "C++"
183188
* Example:
184189
* const char* s = ...;
185190
* char* result = NULL;
186-
* if (iconv_string("UCS-4-INTERNAL", "autodetect_utf8",
191+
* if (iconv_string("UCS-4-INTERNAL", "GBK",
187192
* s, s+strlen(s)+1, &result, NULL) < 0)
188193
* perror("iconv_string");
189194
*

0 commit comments

Comments
 (0)