#Cannot write Unicode characters into String

3 messages · Page 1 of 1 (latest)

broken saddle
#

In this code that takes a text file, searches for each word truncates non-alphabetical characters in the front and back, puts it in an array of binary tree (for alphabetical sorting), and then outputs it to the console and a text file, Unicode characters are inputed as ascii noise (since the encoding of the file is Utf-8). This leads to sentences like, “yarns—and,” being turned into, “yarnsâand,” https://github.com/Christian-Nerd/CS132_Project3/tree/Unicode How do I fix this?problem? I already changed the file buffers of ifstream/ostream to wchar_t, but I’m not sure how to convert the odd utf-8 characters back into it’s proper form.

GitHub

Contribute to Christian-Nerd/CS132_Project3 development by creating an account on GitHub.

livid onyxBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

broken saddle
#

This was a completed school project that I want to perfect...now that i'm in the summer.