Arabic string inversion in C ++

How can an arabic string be reversed using C ++? For example, the flip side of ΩƒΩ„Ω…Ψ© is a symbol. The shape of the Arabic letters differs according to the position in the word. (initial, medial or final word). Are there other rules for concatenating Arabic letters?

+6
source share
1 answer

As Petes says, and according to the links that I can find, for example Wikipedia , the rendering engine should use the appropriate glyphs for you, Article citation:

For example, many Arabic letters are represented by a different symbol when a letter appears at the end of a word than when a letter appears at the beginning of a word. The Unicode approach prefers these letters to be mapped to the same character for easy internal processing and storage of text files. In addition to this approach, text software must select different character options to display a character based on its context.

A quick experiment with the online unicode converter seems to confirm that:

ΩƒΩ„Ω…Ψ© 

in hexadecimal code points:

 0643 0644 0645 0629 

a

 Ψ©Ω…Ω„Ωƒ 

is an:

 0629 0645 0644 0643 

which is the exact opposite of previous code points.

+5
source

Source: https://habr.com/ru/post/982991/


All Articles