﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3087	UTF problem with _GUICtrlRichEdit_StreamFromFile in 3.3.14.0	mLipok	Jpm	"Disscusion here:
https://www.autoitscript.com/forum/topic/173900-problem-with-_guictrlrichedit_streamfromfile-33140/

REPRO SCRIPT:


{{{

#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    Local $hGui, $iMsg, $idBtnNext, $iStep = 0, $idLblMsg, $hRichEdit
    $hGui = GUICreate(""Example ("" & StringTrimRight(@ScriptName, StringLen("".exe"")) & "")"", 320, 350, -1, -1)
    $hRichEdit = _GUICtrlRichEdit_Create($hGui, ""This is a test."", 10, 10, 300, 220, _
            BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL))
    $idLblMsg = GUICtrlCreateLabel("""", 10, 235, 300, 60)
    $idBtnNext = GUICtrlCreateButton(""Next"", 270, 310, 40, 30)
    GUISetState(@SW_SHOW)

    _GUICtrlRichEdit_StreamFromFile($hRichEdit, @ScriptDir & ""\wzor.rtf"")
    While True
        $iMsg = GUIGetMsg()
        Select
            Case $iMsg = $GUI_EVENT_CLOSE
                _GUICtrlRichEdit_Destroy($hRichEdit) ; needed unless script crashes
                ; GUIDelete()   ; is OK too
                Exit
        EndSelect
    WEnd
EndFunc   ;==>Example


}}}

Please make some fix.
My proposal is to add new parameters for File enconding with default $FO_UTF8_NOBOM as it is default for new files in AutoIt 3.3.14.0+

Consider to make the relevant amendments also in:
_GUICtrlRichEdit_StreamToFile
"	Bug	closed	3.3.15.1	Standard UDFs	3.3.15.0	None	Fixed		
