Try not to write UTF-8 to DWIs.

This commit is contained in:
Glenn Maynard
2003-01-09 09:00:40 +00:00
parent 7acd31aafc
commit 0980891b5a
+7 -3
View File
@@ -224,9 +224,13 @@ bool NotesWriterDWI::Write( CString sPath, const Song &out )
if( fp == NULL )
RageException::Throw( "Error opening song file '%s' for writing.", sPath.GetString() );
if(out.GetFullTitle().GetLength() != 0)
fprintf( fp, "#TITLE:%s;\n", out.GetFullTitle().GetString() );
if(out.m_sArtist.GetLength() != 0)
/* If we have transliterations, write them instead of the real title, since
* DWI doesn't support UTF-8. */
if(!out.GetSortTitle().empty())
fprintf( fp, "#TITLE:%s;\n", out.GetSortTitle().GetString() );
if(!out.m_sArtistTranslit.empty())
fprintf( fp, "#ARTIST:%s;\n", out.m_sArtistTranslit.GetString() );
else if(!out.m_sArtist.empty())
fprintf( fp, "#ARTIST:%s;\n", out.m_sArtist.GetString() );
ASSERT( out.m_BPMSegments[0].m_fStartBeat == 0 );
fprintf( fp, "#BPM:%.3f;\n", out.m_BPMSegments[0].m_fBPM );