I'm trying to create an ID3_Tag for a file whose path name is like:
In my application, I have the path name as a Windows-type wchar_t pointer. =
I can convert it to UTF-8 easily, or to any other character encoding with =
If I try
and fileLoc is UTF-8, then Link() fails. (As a UTF-8 string, the =F3 is ex=
panded to 0xC3 0xB3). And there doesn't appear to be a way to Link() with =
a whcar_t version of fileLoc.
It looks like Id3lib tries to open the file in utils.cpp in ID3_Err dami::o=
penReadableFile(String name, ifstream& file) and it uses file.open(name.c_s=
tr() where file is an std::ifstream
I'm digging through and experimenting with the source code to try to figure=
out a way to fix this ... by any chance does anybody know a relatively eas=
y solution to this? Should I be converting the file path name to ISO-8859-=
1 (if I am remembering the "typical" windows code page correctly)?
There doesn't seem to be an equivalent call to Link() for wchar_t, or UTF-8=
. I kind of hate converting the string -from- unicode to a code page ... I=
guess that would probably not lead to data loss, the c++ std functions are=
probably going to recognize 8859-1, because that is what windows is using =
at least in the file system.
When I get the file path name from windows though, I have their idea of "UN=
ICODE" enabled, so Windows is giving me the path in whcar_t.
Anyway ... I am going to keep experimenting with this and digging through t=
he code, but I am about to break for lunch so I am hoping somebody might be=
reading the list and have an easy solution to this, because it is probably=
going to be a couple of hours at least of trial and error the way I'm doin=
Thanks for any help.
"For the first time in history of a civilized nation we have full gun
control and registration, our streets will be safer, the police will do
a better job of protecting its citizens, and the world will follow our
lead into the future".=20
-- Adolph Hitler - 1935
:: Currently listening to Sonate in G-Dur, Opus 5 No. 2, Adagio sostenuto, =
1799, by Beethoven, from "Cello-Sonaten"
Connect and share in new ways with Windows Live.