Changeset 7733
- Timestamp:
- 2004-07-09T17:20:43+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/cfgread.cpp
r7731 r7733 137 137 bool inquote=false; 138 138 char quotemark='"'; 139 char preceding ; // 1-char state to allow \" and \'139 char preceding='\0'; // 1-char state to allow \" and \' 140 140 // see if this is a quoted phrase 141 141 if (c1=='\'' || c1=='\"') { // starts with a quote … … 176 176 unsigned char c2; 177 177 // two byte character 178 if (!filein.eof()) filein.get((char)c2); // get takes a signed char178 filein.get((char&)c2); // get takes a signed char 179 179 c = ((uc1 & 0x1f) << 6) + (c2 & 0x3f); 180 180 } else if (uc1 >= 0xe0 && uc1 <= 0xef) { 181 181 // 3-byte character 182 182 unsigned char c2, c3; 183 if (!filein.eof()) filein.get((char)c2);184 if (!filein.eof()) filein.get((char)c3);183 filein.get((char&)c2); 184 filein.get((char&)c3); 185 185 c = ((uc1 & 0xf) << 12) + ((c2 & 0x3f) << 6) 186 186 + (c3 & 0x3f); 187 } // we don't do group2/plane0 (4,5,6-byte utf-8)187 } else {c=uc1;} // we don't do group2/plane0 (4,5,6-byte utf-8) 188 188 189 189 curvalue.push_back(c); // 16bit unicode
Note:
See TracChangeset
for help on using the changeset viewer.