Simon Slavin <slav...@bigfraud.org> wrote:
> On 17 Nov 2009, at 6:37pm, Igor Tandetnik wrote:
> 
>> Simon Slavin <slav...@bigfraud.org> wrote:
>>> First split the string into characters, then reassemble them in
>>> reverse order.
>> 
>> The problem is, in Unicode it's not quite clear what constitutes a
>> "character". Are we talking about codepoints, sort elements,
>> graphemes? Depending on the application, either definition might
>> make sense.   
> 
> I agree about the problem, but sort elements is the obvious answer in
> this case.

This would mean that the result of the hypothetical flip() function would be 
locale-dependent. E.g. in Spanish Traditional sort, a combination 'ch' sorts as 
if it were a single letter between 'c' and 'd', forming a single sort element 
(a so-called contraction). So should 'a ch b' reverse to 'b ch a' under Spanish 
Traditional sort, and to 'b hc a' otherwise? Would you pass a desired locale as 
a parameter to flip(), in order to achieve that?

Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to