I am working with several files in various formats (PDF, HTML, DOCX) that contain Devanagari (Indian) script.
When I try to copy text using either CMD+C or the right-click menu, it is transformed into latin letters immediately:

Both the copy source (Safari in this case) and target (TextEdit) support Devanagari script.
Why does this happen and how can I fix it?