--- parser3/src/classes/table.C 2026/09/29 02:56:52 1.384 +++ parser3/src/classes/table.C 2026/11/28 22:13:43 1.385 @@ -26,7 +26,7 @@ #include "pa_array.h" #include "pa_varray.h" -volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.384 2026/09/29 02:56:52 moko Exp $"; +volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.385 2026/11/28 22:13:43 moko Exp $"; // class @@ -1100,7 +1100,7 @@ struct Table_seq_item : public PA_Alloca }; #endif static int sort_cmp_string(const void *a, const void *b) { - return strcmp( + return Charset::strcmp_utf8( static_cast(a)->value.c_str, static_cast(b)->value.c_str ); @@ -1143,8 +1143,7 @@ static void _sort(Request& r, MethodPara seq[i].value.d=value.as_expr_result().as_double(); } - // @todo: handle this elsewhere - if(r.charsets.source().NAME()=="KOI8-R" && key_values_are_strings) { + if(!r.charsets.source().isUTF8() && key_values_are_strings) { // Charset::strcmp_utf8 requires UTF-8 for(i=0; i