Changeset 3217
- Timestamp:
- 2002-07-05T12:13:22+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/cgiutils.cpp
r3151 r3217 26 26 #include "cgiutils.h" 27 27 #include "gsdlunicode.h" 28 #include "unitool.h" // in mg, for output_utf8_char 28 29 29 30 static unsigned short hexdigit (unsigned short c) { … … 57 58 58 59 // convert %xx and + to their appropriate equivalents 59 // IE 6.0 and later use "%u" followed by 4 hex digits... 60 // IE 6.0 and later use "%u" followed by 4 hex digits... MS IIS extension! 60 61 void decode_cgi_arg (text_t &argstr) { 61 62 text_t::iterator in = argstr.begin(); … … 221 222 // space 222 223 outtext.push_back('+'); 224 } else if (c > 255) { // unicode character 225 unsigned char buf[3]; // up to 3 bytes 226 buf[0]='\0';buf[1]='\0';buf[2]='\0'; 227 output_utf8_char(c,buf, buf+2); 228 outtext.push_back('%'); 229 c2hex(buf[0], ttmp); 230 outtext += ttmp; 231 outtext.push_back('%'); 232 c2hex(buf[1], ttmp); 233 outtext += ttmp; 234 if (buf[2]) { 235 outtext.push_back('%'); 236 c2hex(buf[2], ttmp); 237 outtext += ttmp; 238 } 223 239 } else { 224 240 // everything else
Note:
See TracChangeset
for help on using the changeset viewer.