Hello, im kinad new to AppleScript Studio & Xcode, and im trying to load some data from a txt file loacted ind my project folder to a NSScroolView but my words contain æøå. and each time i try to load the data the word like " hjælp " danish for help is showen as " hjElp" with some fancy crap ontop E.
and here is what i use to load data…
[added AppleScript Tags for ease of use – ACB]
set FileContent to (((path to home folder) & "rdiff-logs:local:" as text) & mydate & ":" & mytime & ".txt")
set FileContentTmp to FileContent as alias
set FileContentShow to read FileContentTmp
set contents of text view 1 of scroll view 1 of window 1 to FileContentShow
and i have tryed using this to, with same res
set line_1 to "test æ"
set line_2 to "test ø"
set line_3 to "test å"
set the_text to ""
set all_lines to {line_1, line_2, line_3}
repeat with i in all_lines
set the_text to the_text & i & return
end repeat
tell text view 1 of scroll view 1 of window 1 to set contents to the_text
hmm - it should … I have tried it here and it loaded all scandinavian and german accents I tried.
an other way to load a UTF8 encoded text file into a text view was this:
call method "setString:" of myTextView with parameter (call method "stringWithContentsOfFile:encoding:error:" of class "NSString" with parameters {myFilePath, 4, null})