- Timestamp:
- 06/15/11 18:05:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common.c
r251 r256 25 25 iconv_t conv_desc; 26 26 27 const char* key_special_chars = ",\" \\/";28 const char* subfield_special_chars = ",\" \\|";29 const char* common_special_chars = ",\" \\";27 const char* key_special_chars = ",\"/"; 28 const char* subfield_special_chars = ",\"|"; 29 const char* common_special_chars = ",\""; 30 30 31 31 #define REGLOOKUP_EXIT_OK 0 … … 70 70 /* Returns a newly malloc()ed string which contains original buffer, 71 71 * except for non-printable or special characters are quoted in hex 72 * with the syntax ' \xQQ' where QQ is the hex ascii value of the quoted72 * with the syntax '%QQ' where QQ is the hex ascii value of the quoted 73 73 * character. A null terminator is added, since only ascii, not binary, 74 74 * is returned. … … 119 119 } 120 120 121 if(str[i] < 32 || str[i] > 126 || strchr(special, str[i]) != NULL) 121 if(str[i] < 32 || str[i] > 126 122 || str[i] == '%' || strchr(special, str[i]) != NULL) 122 123 { 123 124 num_written += snprintf(ret_val + num_written, buf_len - num_written, 124 " \\x%.2X", str[i]);125 "%%%.2X", str[i]); 125 126 } 126 127 else … … 135 136 /* Returns a newly malloc()ed string which contains original string, 136 137 * except for non-printable or special characters are quoted in hex 137 * with the syntax ' \xQQ' where QQ is the hex ascii value of the quoted138 * with the syntax '%QQ' where QQ is the hex ascii value of the quoted 138 139 * character. 139 140 */
Note: See TracChangeset
for help on using the changeset viewer.