You do not say, but * am assuming that the Latin Characters copy across as normal and it is only the Malayalam characters are the ones giving the problem. *
If you are cutting and pasting from say a Windows system the character set will default to the setting of your system which is 8-bit ISO-8859-1 in English-GB. It must be set to allow Malayalam, If not each Unicode Malayalam character will appear to be three -1 characters. In LibreOffice you must also set the default language in LANGUAGE SETTING> LANGUAGES to support complex Text Layout.
Sorry, do not have a Windows system to find out how to control the settings. My system just defaults to Unicode.
I hope this may provide some additional explanation.
At first glance, Unicode can seem confusing because there are four different forms.
Unicode is a 32 bit standard that theoretically supports 1,114,112 code points. Currently about 138,000 are used which lives a little bit left for future expansion! It can be encoded in three forms, UTF-32 using 32 bits, UTF-16 using 1 or 2 16 bit characters or UTF-8 which is the normal LibO default cleverly using 1,2,3 or 4 8-bit characters.
Unicode encloses four different character sets.
US-ASCII 7 bits is contained in the first 127 characters (x’00’ to x’7E’) (1968 standard)
ISO-8859-1 8 bits the first 255 characters (x’00’ to x’FF’) adds Western Latin including French and German accents, £ sign etc. (1987 standard)
Basic Multilingual Plane 65,536 code points, most of the world excluding Chinese Japanese but including Malayalam and the € (EURO) sign.
UTF-8 is the most compact form where Latin is the basic character set in use, but least efficient when you are using the majority of characters not contained in the first 256 characters.
If you display characters such as Malayalam as Latin, each character will appear to be two three or four what appear to be random characters as in the example above.
One quick test to see if this could be the problem is to use the € ~(EURO) character, which is why a large number of users cannot display the € sign and type EURO instead.