miurla / babyagi-ui

BabyAGI UI is designed to make it easier to run and develop with babyagi in a web app, like a ChatGPT.
https://babyagi-ui.vercel.app
MIT License
1.31k stars 277 forks source link

Fixing Encoding Issues for Special Characters and Emojis on Windows #127

Closed miurla closed 1 year ago

miurla commented 1 year ago

We have identified an issue where special characters, such as Spanish accented letters and emojis, are not being correctly encoded when the text is exported to a .txt file, specifically on Windows systems. This results in these characters being displayed incorrectly (i.e., "garbled" or "mojibake") when the .txt file is opened.

To resolve this issue, we have made the following changes:

We have added a UTF-8 Byte Order Mark (BOM) at the beginning of the text file. This ensures that the file is correctly recognized as UTF-8 encoded when opened, even on Windows systems which may use different default encodings.

We have specified 'text/plain;charset=utf-8' as the type when converting the text to a Blob. This ensures that all characters, including special characters and emojis, are correctly encoded as UTF-8.

With these changes, the exported .txt file should now correctly display all characters, including special characters and emojis, on all systems, including Windows.

ref: #125

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
babyagi-ui ✅ Ready (Inspect) Visit Preview Jul 6, 2023 0:22am