ٹیکسٹ ریورسر

استعمال کا طریقہ 3 مراحل
  1. اپنا عبارت چسپاں کریں۔
  2. الٹنے کا طریقہ چنیں اور الٹ دیں دبائیں۔
  3. کاپی کریں دبائیں۔
الٹی ہوئی عبارت

حروف کی الٹ پھیر UTF-16 اکائیوں کے بجائے Unicode کوڈ پوائنٹس پر کی جاتی ہے، اس لیے ایموجی اور اعراب والے حروف ٹوٹنے کے بجائے سالم رہتے ہیں۔

یہ ٹول کیسے کام کرتا ہے

ایک ہی خانے میں چار مختلف عمل رکھے ہیں، کیونکہ آپ جو کر رہے ہوں اس کے مطابق الٹانے کے چار مختلف مطلب ہوتے ہیں۔ حروف الٹانا عبارت پر ایک وقت میں ایک کوڈ پوائنٹ پیچھے کی طرف چلتا ہے۔ الفاظ الٹانا ہر سطر کے اندر الفاظ کی ترتیب پلٹ دیتا ہے اور ان کے درمیان کی خالی جگہ جوں کی توں رہنے دیتا ہے۔ سطریں الٹانا سطروں کی ترتیب پلٹ دیتا ہے اور ہر سطر کو ویسے ہی چھوڑ دیتا ہے۔ الفاظ کے اندر الٹانا ہر لفظ کو اپنی جگہ رکھتا ہے اور ہر ایک کو الٹا کر دیتا ہے۔

تقسیم اس بنیاد پر ہوتی ہے کہ ذخیرے کی اکائیوں کے بجائے کوڈ پوائنٹ گنے جائیں، جس سے بنیادی دائرے سے باہر کے حروف — زیادہ تر ایموجی، بہت سے CJK اضافے، ریاضیاتی علامتیں — بیچ سے کٹ کر خالی مربعوں میں بدلنے سے بچ جاتے ہیں۔ بات یہیں تک ہے: عمل کوڈ پوائنٹ پر متعین ہے، اس چیز پر نہیں جسے پڑھنے والا حرف کہے گا۔

الٹاؤ کہاں توقع کے خلاف چلنے لگتا ہے

  • الگ محفوظ ہونے والے اعراب اپنی جگہ چھوڑ دیتے ہیں: جو حرف بنیادی حرف اور ایک ملانے والے اعراب سے مل کر لکھا گیا ہو وہ دو کوڈ پوائنٹ ہے، اور انہیں الٹنے سے اعراب اسی حرف پر جا بیٹھتا ہے جو اب اس سے پہلے آ گیا۔ پہلے سے جڑے ہوئے حروف والی عبارت متاثر نہیں ہوتی۔
  • جڑی ہوئی ایموجی بکھر جاتی ہیں: جھنڈے، جلد کے رنگ اور خاندان کے سلسلے کئی کوڈ پوائنٹوں کے جوڑ سے بنتے ہیں۔ الٹنے پر وہ ایک علامت کے طور پر باقی رہنے کے بجائے اپنے ٹکڑوں میں بٹ جاتے ہیں۔
  • الفاظ الٹانا سطر بہ سطر کام کرتا ہے: ہر سطر اپنے طور پر پلٹتی ہے اور سطریں اپنی اصل ترتیب میں رہتی ہیں۔ جب پوری دستاویز الٹنی ہو تو سطر والا طریقہ استعمال کریں۔
  • الٹی ہوئی عبارت دائیں سے بائیں والی عبارت نہیں ہوتی: حروف الٹی ترتیب میں آ جاتے ہیں، جو اس زبان سے مختلف چیز ہے جو اسی طرح پڑھی جاتی ہے۔ عربی اور عبرانی الٹانے سے نہیں بنتیں۔

Code points, not characters as people see them

Reversing text sounds trivial and is not, because what counts as "a character" depends on who is asking.

The [msm_tool slug="reverse-text"] reverses by code point. For plain English that is exactly right and the result is what you expect. For anything else it can come apart, and the reason is worth understanding.

What comes apart

  • Composed emoji. A family emoji or a flag is several code points joined by invisible connectors. Reversed, the connectors end up in the wrong places and the emoji separates into its components — a family becomes individual people, a flag becomes two letters.
  • Skin tone modifiers. These follow the emoji they modify. Reversed, the modifier lands before it and applies to whatever now precedes it, or to nothing.
  • Combining accents. An é can be one code point or two — an e followed by a combining acute. In the two-code-point form, reversing puts the accent on the wrong letter.
  • Scripts with joining behaviour, such as Arabic and Urdu, where letters change shape depending on their neighbours. Reversed, the shaping is wrong throughout.

None of this is a bug in the reversal. It is what reversing a sequence of code points does, and no simple implementation avoids it.

Right-to-left text is a different problem

Arabic, Hebrew, Urdu and Persian are already displayed right to left by the browser. Reversing their code points does not produce mirrored text — it produces text in the wrong logical order, which then gets displayed right to left as well, and the result is nonsense in both directions.

If you want to display text in the other direction, that is a CSS matter rather than a text-transformation one. Reversing the characters is not how it is done.

Word reversal is a different operation

Reversing the order of words — "one two three" becoming "three two one" — keeps each word readable. Reversing characters gives "eerht owt eno".

Both are called reversing and they are not the same thing. Decide which you want before running either.

What it is actually for

Honestly, not much in production. The genuine uses are narrow:

  1. Testing that a system handles unusual input. Reversed text is a quick source of strings that look wrong and are valid.
  2. Puzzles, wordplay and palindrome checking. Reversing and comparing is the whole algorithm.
  3. Demonstrating the code point problem to someone who does not believe text is complicated.
  4. Novelty — a reversed name, a hidden message, a bit of decoration.

What it is not for

Obfuscation. Reversed text is readable by anyone who notices, and trivially reversed by anything automated. It hides nothing from a scraper, a filter or a curious reader, and treating it as concealment is a mistake people make with email addresses.

It is also not encoding. There is no key and no transformation beyond the order.

Nothing is uploaded

The reversal happens in your browser. Worth knowing given that the main legitimate use is testing with input you might not want to paste elsewhere.

اکثر پوچھے گئے سوالات

خاص طور پر ٹیکسٹ ریورسر کے بارے میں۔ اس زمرے سے متعلق عمومی سوالات کے جواب زمرے کے صفحے پر موجود ہیں۔

ایک کوڈ پوائنٹ والی ایموجی بچ جاتی ہیں۔ جو کئی کو جوڑ کر بنی ہوں — جھنڈے، خاندان، جلد کے رنگ — وہ اپنے حصوں میں بٹ جاتی ہیں۔
لفظ والا طریقہ الفاظ کی ترتیب بدلتا ہے۔ لفظ کے اندر والا طریقہ ترتیب چھوڑ دیتا ہے اور ہر لفظ کے اندر حروف الٹ دیتا ہے۔
ہر سطر الگ الگ، اور سطریں اپنی اصل ترتیب میں رہتی ہیں۔ پوری دستاویز سطر والا طریقہ الٹتا ہے۔
وہ حروف ایک بنیادی حرف اور ایک الگ اعراب کے نشان کے طور پر محفوظ تھے۔ سلسلہ الٹنے سے وہ نشان اپنے نئے پڑوسی پر چلا جاتا ہے۔
نہیں۔ یہ صرف حروف کی ترتیب بدلتا ہے۔ دائیں سے بائیں پڑھی جانے والی زبانوں کو اصل رسم الخط چاہیے، الٹے ہوئے لاطینی حروف نہیں۔

نئے ٹولز، خصوصیات اور کارکردگی بڑھانے کے مشوروں کی اطلاع پانے کے لیے سبسکرائب کریں۔