Changeset 370
- Timestamp:
- Sep 28, 2008, 6:59:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cppbase/bs_string_conv.cpp
r254 r370 9 9 10 10 /* 11 * This file Copyright (C) 2002 Ulrich Mller.11 * This file Copyright (C) 2002-2008 Ulrich Mller. 12 12 * This program is free software; you can redistribute it and/or modify 13 13 * it under the terms of the GNU General Public License as published by … … 48 48 #pragma hdrstop 49 49 50 #define CP_UTF8 1208 51 50 52 DEFINE_CLASS(BSUniCodec, BSRoot); 51 53 … … 86 88 * constructor. Creates the internal conversion 87 89 * object by calling encCreateCodec. 90 * 91 *@@changed WarpIN V1.0.18 (2008-09-24) [pr]: added codepage 1208 support @@fixes 1127 88 92 */ 89 93 … … 92 96 _usCodepage(usCodepage) 93 97 { 94 ENCID id = FindEncodingID(usCodepage, &_fDouble); 95 98 ENCID id; 99 100 // WarpIN V1.0.18 101 if (usCodepage == CP_UTF8) 102 { 103 _pCodec = NULL; 104 return; 105 } 106 107 id = FindEncodingID(usCodepage, &_fDouble); 96 108 if (_fDouble) 97 109 { … … 118 130 * destructor. Frees the internal conversion object 119 131 * by calling encFreeCodec. 132 * 133 *@@changed WarpIN V1.0.18 (2008-09-24) [pr]: added codepage 1208 support @@fixes 1127 120 134 */ 121 135 122 136 BSUniCodec::~BSUniCodec() 123 137 { 124 encFreeCodec((PCONVERSION*)&_pCodec); 138 if (_pCodec) 139 { 140 encFreeCodec((PCONVERSION*)&_pCodec); 141 _pCodec = NULL; 142 } 125 143 } 126 144 … … 151 169 * to UTF-8. Used by BSString::assignUtf8 and 152 170 * others. 171 * 172 *@@changed WarpIN V1.0.18 (2008-09-24) [pr]: added codepage 1208 support @@fixes 1127 153 173 */ 154 174 … … 158 178 { 159 179 PCONVERSION pTable = (PCONVERSION)_pCodec; 180 181 // WarpIN V1.0.18 182 if (QueryCodepage() == CP_UTF8) 183 { 184 ustr.assignUtf8(pcszCP); 185 return; 186 } 160 187 161 188 XSTRING xstrNew; … … 226 253 * Characters that are not supported with the 227 254 * given codepage are replaced by '?'. 255 * 256 *@@changed WarpIN V1.0.18 (2008-09-24) [pr]: added codepage 1208 support @@fixes 1127 228 257 */ 229 258 … … 232 261 unsigned long ulLength) 233 262 { 263 // WarpIN V1.0.18 264 if (QueryCodepage() == CP_UTF8) 265 { 266 str.assign(pcszUni); 267 return; 268 } 269 234 270 PCONVERSION pTable = (PCONVERSION)_pCodec; 235 271
Note:
See TracChangeset
for help on using the changeset viewer.