troubleshooting Question

Read from Unicode Text Files

Avatar of RunBoris
RunBoris asked on
Programming Languages-OtherC++
33 Comments1 Solution1388 ViewsLast Modified:
I made this nifty app in C++ using standard resources like iostream and fstream, which takes a text playlist from itunes, finds all the songs anywhere on the hard drive, and copies them to one folder (to be put on a CD, flash drive, etc.). Well, apparently up until a month or so ago, these text files were saved as ANSI; now they are saved by iTunes as Unicode. I don't know if its UTF-8, 16, 32 or what. All I know is now my app won't work unless I open the text file and save it as an ANSI text file.

So my question is, what is the simplest way to enable the reading of unicode files? It would be really awesome if there was a header/class file out there that made it as easy as replacing ifstream.get with utfstream.get or something to that effect. Thanks a bunch!
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <cstdlib>
#include <IO.h>
#include <stdexcept>
int main()
    ifstream inList;
    inList.get(st_list.s_Name, MAX_STRING, '\t');
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 33 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 33 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros