From 4ca86c5a2883edd1ee337e4c0a7756a711f55fc1 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 30 Jun 2003 08:40:10 +0000 Subject: [PATCH] allow iso-8859-1 in DWIs --- stepmania/src/NotesLoaderDWI.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stepmania/src/NotesLoaderDWI.cpp b/stepmania/src/NotesLoaderDWI.cpp index c4d84c6741..3c0306f01a 100644 --- a/stepmania/src/NotesLoaderDWI.cpp +++ b/stepmania/src/NotesLoaderDWI.cpp @@ -6,6 +6,7 @@ #include "RageException.h" #include "MsdFile.h" #include "RageUtil.h" +#include "RageUtil_CharConversions.h" #include "NoteData.h" #include @@ -302,10 +303,21 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out ) out.m_sMusicFile = sParams[1]; else if( 0==stricmp(sValueName,"TITLE") ) + { GetMainAndSubTitlesFromFullTitle( sParams[1], out.m_sMainTitle, out.m_sSubTitle ); + /* As far as I know, there's no spec on the encoding of this text. (I didn't + * look very hard, though.) I've seen at least one file in ISO-8859-1. */ + ConvertString( out.m_sMainTitle, "utf-8,english" ); + ConvertString( out.m_sSubTitle, "utf-8,english" ); + } + else if( 0==stricmp(sValueName,"ARTIST") ) + { out.m_sArtist = sParams[1]; + LOG->Trace("conv '%s'", out.m_sArtist.c_str()); + ConvertString( out.m_sArtist, "utf-8,english" ); + } else if( 0==stricmp(sValueName,"CDTITLE") ) out.m_sCDTitleFile = sParams[1];