nf67 Posted June 26, 2010 Share Posted June 26, 2010 (edited) Hi there, I was wondering if it's possible to put special characters into some kind of text file (.rtf .txt .doc , any text format would be fine).The script below demonstrates my problem:$String = ChrW(8592) MsgBox(0,"Character:", $String) ;Shows the character FileWrite(@ScriptDir & "\File.txt", $String) ShellExecute(@ScriptDir & "\File.txt") ;Doesn't show the characterI also tried to write into an HTML file and use & # 8 5 9 2 ; which worked fine, but my "formatting" gets lost when viewing it (no linebreaks, no double spaces).Please note that there is only basic text, nothing fancy.Thanks Edited June 26, 2010 by nf67 Link to comment Share on other sites More sharing options...
sahsanu Posted June 26, 2010 Share Posted June 26, 2010 I was wondering if it's possible to put special characters into some kind of text file (.rtf .txt .doc , any text format would be fine). Take a look to FileOpen function ;-) $String = ChrW(8592) $funicode=FileOpen(@ScriptDir & "\File.txt",258) ;pay attention to the 258. You have all the available options in the help FileWrite($funicode, $String) FileClose($funicode) ShellExecute(@ScriptDir & "\File.txt") Cheers, sahsanu Link to comment Share on other sites More sharing options...
nf67 Posted June 26, 2010 Author Share Posted June 26, 2010 (edited) Hmm gives me the following result: ↠Odd Edit: It does seem to work in the example, let me check my code again. Edit 2: Weird results when viewing in browser, use Right Click encoding options to switch to UTF -solved :-) Thanks Sahsanu Edited June 26, 2010 by nf67 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now