redcrusher Posted December 28, 2009 Share Posted December 28, 2009 (edited) For some reason, when i get the title of a webpage that has asian characters in it, it writes "???????" for those characters. Does anyone know the reson why? $title = WinGetTitle("[active]") FileWriteLine($file,$title) Edited December 28, 2009 by redcrusher Link to comment Share on other sites More sharing options...
JohnOne Posted December 28, 2009 Share Posted December 28, 2009 Probably you dont have them additional languages installed on your computer. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Paperfeed Posted December 28, 2009 Share Posted December 28, 2009 You have to open a file with the Unicode flag. Try this: $hFile = FileOpen(@ScriptDir & "\TEST.txt", 129) ; UTF-8 Unicode Writing Mode (128 for UTF-8 + 1 for Writing mode = 129) $sTitle = "テスト タイトル - 日本語" FileWriteLine($hFile, $sTitle) FileClose($hFile) Don't forget that you have to make sure your editor (atleast with Scite) is set to the proper encoding as well (UTF-8 with BOM should do) or it won't compile. Link to comment Share on other sites More sharing options...
redcrusher Posted December 28, 2009 Author Share Posted December 28, 2009 You have to open a file with the Unicode flag. Try this: $hFile = FileOpen(@ScriptDir & "\TEST.txt", 129) ; UTF-8 Unicode Writing Mode (128 for UTF-8 + 1 for Writing mode = 129) $sTitle = "テスト タイトル - 日本語" FileWriteLine($hFile, $sTitle) FileClose($hFile) Don't forget that you have to make sure your editor (atleast with Scite) is set to the proper encoding as well (UTF-8 with BOM should do) or it won't compile. PERFECT! thank you 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