Using Python 3.10.12 on Ubuntu 22.04.3 LTS
>>> l = ['ا', 'پ', 'ب', 'ت', 'ٹ']
>>> l.sort()
>>> l
['ا', 'ب', 'ت', 'ٹ', 'پ']


On Thu, Jan 4, 2024 at 11:09 AM zohaibnadeem13@gmail.com (Zohaib Nadeem) via ruby-core <ruby-core@ml.ruby-lang.org> wrote:
Issue #20148 has been reported by zohaibnadeem13@gmail.com (Zohaib Nadeem).

----------------------------------------
Bug #20148: Sorting not working as expected on Urdu words.
https://bugs.ruby-lang.org/issues/20148

* Author: zohaibnadeem13@gmail.com (Zohaib Nadeem)
* Status: Open
* Priority: Normal
* ruby -v: 3.1.4
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I was trying to sort an array of Urdu characters and found out an ambiguity in the result. Here is the script that I am using.
['ا', 'پ', 'ب', 'ت', 'ٹ'].sort

Actual Result:
["ا", "ب", "ت", "ٹ", "پ"]

Expected Result:
["ا", "ب", 'پ', "ت", "ٹ"]



--
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/