I am not an expert with character encodings. According to the converter your file has ISO-8859-1 encoding. See:
* Converting file /home/juha/SW/LazTest/sample_project/Unit1.pas *
Changed encoding from ISO-8859-1 to UTF-8
Replaced unit "Windows" with "LCLIntf, LCLType, LMessages" in uses section.
Now, the strange thing is that I see 'Ïðèâ³ò!' in Lazarus editor always, with or without the conversion. It looks like a bug. I think the string should be converted.
When I open the file with another editor (KWrite) I see 'Привіт!' which is the correct string.
About how the code in Lazarus detects the file's encoding? It scans the file contents up to some length and guesses.
I didn't write the code and I don't even understand it. You must study the code yourself. See GuessEncoding function.
I used it in Delphi converter but it may well have bugs.
The syntax:
Caption = #1055#1088#1080#1074#1110#1090'!'
is not really a character encoding but .DFM form file's specific way to represent WideStrings.
You may want to see an old thread about the same topic:
http://lazarus.freepascal.org/index.php/topic,9045Before that I didn't even know such syntax existed.
Somebody with more knowledge about character encodings could tell what can be expected from conversion.
Juha