From 167a453b22fe86c327b0b3cd1948e1fb919c13bb Mon Sep 17 00:00:00 2001 From: eddie-0815 Date: Wed, 9 Jan 2008 22:26:48 +0000 Subject: Added UTF8-Conversion for values read out of the txt file. This must be done only on OS X. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@768 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UFiles.pas | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index 274bf404..69beefe9 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -54,6 +54,7 @@ implementation uses TextGL, UIni, + UPlatform, UMain; //-------------------- @@ -131,6 +132,15 @@ begin //Check the Identifier (If Value is given) if (Length(Value) <> 0) then begin + + {$IFDEF DARWIN} + if ((Identifier = 'MP3') or (Identifier = 'COVER') or (Identifier = 'BACKGROUND') or (Identifier = 'VIDEO')) then + begin + // Filenames on OS X must be UTF8: + Value := Utf8Encode(Value); + end; + {$ENDIF} + //----------- //Required Attributes @@ -332,7 +342,7 @@ Result := False; //Open File and set File Pointer to the beginning AssignFile(SongFile, Song.Path + Song.FileName); - + // if assinged( SongFile ) then begin try -- cgit v1.2.3