﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2901	Text file as a binary	anonymous	Jon	"Example
{{{
#include 'FileConstants.au3'

$h = FileOpen('test.txt', $FO_OVERWRITE)
FileWrite($h, 'abcdef')
FileClose($h)

test(0)
test($FO_BINARY)
test($FO_UTF16_LE)
test($FO_UTF16_BE)
test($FO_UTF8)
test($FO_UTF8_NOBOM)
test($FO_UTF8_FULL)

Func test($FO)
  $h = FileOpen('test.txt', $FO_READ + $FO)
  $data = FileRead($h)
  FileClose($h)
  ConsoleWrite($data & "" : "" & IsBinary($data) & @CRLF )
EndFunc
}}}
3.3.12.0 output
{{{
abcdef : 0
0x616263646566 : 1
??? : 0
??? : 0
abcdef : 0
abcdef : 0
abcdef : 0
}}}
3.3.13.19 beta output
{{{
abcdef : 0
0x616263646566 : 1
0x63646566 : 1
0x63646566 : 1
0x646566 : 1
0x616263646566 : 1
abcdef : 0
}}}
Why all $FO_UTF* modes (except $FO_UTF8_FULL) return binary data?
----------------------
If change string
{{{
FileWrite($h, 'abcdef')
}}}
to
{{{
FileWrite($h, ' ')
}}}
then ""Error allocating memory"" message will be shown for
{{{
test($FO_UTF16_LE)
test($FO_UTF16_BE)
test($FO_UTF8)
}}}"	Bug	closed	3.3.13.21	AutoIt	3.3.13.19	None	Fixed		
