|
|
| version 1.383, 2026/04/25 13:38:46 | version 1.385, 2026/11/28 22:13:43 |
|---|---|
| Line 417 static void _load(Request& r, MethodPara | Line 417 static void _load(Request& r, MethodPara |
| control_chars.load(*options); | control_chars.load(*options); |
| // loading text | // loading text |
| char *data=file_load_text(r, r.full_disk_path(params.as_file_name(filename_param_index)), true, options); | char *data=file_load_text(r, r.full_disk_path(params.as_file_name(filename_param_index), PA_ALLOW_HTTP), true, options); |
| Skip_lines_action skip_lines_action = (control_chars.separator=='#' || control_chars.encloser=='#') ? skip_empty_lines : skip_empty_and_comment_lines; | Skip_lines_action skip_lines_action = (control_chars.separator=='#' || control_chars.encloser=='#') ? skip_empty_lines : skip_empty_and_comment_lines; |
| Line 1100 struct Table_seq_item : public PA_Alloca | Line 1100 struct Table_seq_item : public PA_Alloca |
| }; | }; |
| #endif | #endif |
| static int sort_cmp_string(const void *a, const void *b) { | static int sort_cmp_string(const void *a, const void *b) { |
| return strcmp( | return Charset::strcmp_utf8( |
| static_cast<const Table_seq_item *>(a)->value.c_str, | static_cast<const Table_seq_item *>(a)->value.c_str, |
| static_cast<const Table_seq_item *>(b)->value.c_str | static_cast<const Table_seq_item *>(b)->value.c_str |
| ); | ); |
| Line 1143 static void _sort(Request& r, MethodPara | Line 1143 static void _sort(Request& r, MethodPara |
| seq[i].value.d=value.as_expr_result().as_double(); | seq[i].value.d=value.as_expr_result().as_double(); |
| } | } |
| // @todo: handle this elsewhere | if(!r.charsets.source().isUTF8() && key_values_are_strings) { // Charset::strcmp_utf8 requires UTF-8 |
| if(r.charsets.source().NAME()=="KOI8-R" && key_values_are_strings) { | |
| for(i=0; i<old_count; i++) | for(i=0; i<old_count; i++) |
| if(*seq[i].value.c_str) | if(*seq[i].value.c_str) |
| seq[i].value.c_str=Charset::transcode(seq[i].value.c_str, r.charsets.source(), pa_UTF8_charset).cstr(); | seq[i].value.c_str=Charset::transcode(seq[i].value.c_str, r.charsets.source(), pa_UTF8_charset).cstr(); |