I am using the following code to get the content of a text file uploaded (plain text with MimeType.JAVASCRIPT) to Google Drive.
let response = await gapi.client.drive.files.get({
'fileId': "google-drive-file-id-goes-here", alt: 'media'
});
let content = response.body;
It gets the actual content in Google Drive if the content only includes English (charset?) letters
- But if the file has other letters, the content shows them as gibberish instead
See example below for the word Pharmacy in other languages and what the content is showing between ()
- Hebrew: בית מרקחת (× × ×ª × ×¨×§× ×ª)
- Japanese 薬局 (è ¬å±)
- Arabic: مقابل (٠٠ابÙ)
How to fix this issue using the gapi.client.drive.files.get() function?
Thanks in advance for your support on this
Fausto