Tad писал(а):
Ну всё - делай компонентМожет сам сделаешь, а Вот тебе исправленный IC
Add(InlineCode,1226154,301,231)
{
WorkPoints=#8:ReadData|
EventPoints=#4:ANSI|4:UTF8|7:UTF16BE|7:UTF16LE|7:UTF32BE|7:UTF32LE|6:Result|
DataPoints=#8:FileName|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|25: FileName: THI_Event;|12: Result,|10: ANSI,|10: UTF8,|13: UTF16BE,|13: UTF16LE,|13: UTF32BE,|25: UTF32LE : THI_Event;|53: procedure ReadData(var _Data:TData; Index:word);|0:|5: end;|0:|14:implementation|0:|31:procedure THiAsmClass.ReadData;|3:var|13: fn: string;|14: st: PStream;|14: c: cardinal;|5:begin|36: Fn := ReadString(_Data, FileName);|30: st := NewReadFileStream(Fn);|16: st.read(c, 4);|10: st.free;|59: if c and $00FFFFFF = $00BFBBEF then _hi_onEvent(UTF8, fn)|105: else if (c and $FFFF0000 <> $00000000) and (c and $0000FFFF = $0000FEFF) then _hi_onEvent(UTF16LE, fn) |104: else if (c and $FFFF0000 <> $00000000) and (c and $0000FFFF = $0000FFFE) then _hi_onEvent(UTF16BE, fn)|104: else if (c and $0000FFFF = $00000000) and (c and $FFFF0000 = $FFFE0000) then _hi_onEvent(UTF32BE, fn) |103: else if (c and $FFFF0000 = $00000000) and (c and $0000FFFF = $0000FEFF) then _hi_onEvent(UTF32LE, fn)|30: else _hi_onEvent(ANSI, fn); |27: _hi_onEvent(Result, c); |4:end;|0:|4:end.|
}