Jump to content


Photo

FileAppend unicode str To StandOut show nothing


  • Please log in to reply
1 reply to this topic

#1 linpinger

linpinger
  • Members
  • 16 posts

Posted 01 March 2012 - 09:16 AM

Code for AHK and AHK_L
Fileappend, Fox is Testing`n, *
Fileappend, 中文`n, *
Fileappend, Fox Test Out`n, *

AHK output:
Fox is Testing
中文
Fox Test Out

AHKL output:

Fox is Testing
Fox Test Out

Test on L version 1.1.7.0

#2 Lexikos

Lexikos
  • Administrators
  • 8834 posts

Posted 01 March 2012 - 09:38 AM

Stdout only supports "multi-byte character strings" (ANSI). It does not support Unicode. If it appears to work in AutoHotkey Basic, that is because the UTF-8 bytes are being reinterpreted as ANSI (the only encoding supported by AutoHotkey Basic) and written out as-is, then whatever program you are in is interpreting those bytes as UTF-8. How the output will be interpreted depends on the program, and cannot be predicted by AutoHotkey itself.