Forum > General
translator, from BASIC to PASCAL (source code translator)
juanirias:
Hi Please need to compile the code attached, is taken from :
https://www.exmortis.narod.ru/src_translate_eng.html
wp:
Add {$mode tp} at the top of the file to make it compile.
juanirias:
Thanks, can see the comments? I have a lot of stranger symbols...
wp:
Open the file in Notepad++, in the statusbar you see that it detects the encoding of the file as OEM866. In Notepad++, select "Encoding" > "Convert to UTF8 without BOM", save. When you now open the file in Lazarus, the comments should be correct.
winni:
Hi!
wp was faster but I've got a simple Lazarus solution:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.Button1Click(Sender: TObject);var st : TStringList;begin st := TStringList.create; st.LoadFromFile('./CROSS.PAS'); st.text := CP866ToUTF8(st.text); showMessage (st.text); st.saveToFile('./CROSSutf8.pas'); st.free;end;
Winni
PS.:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses ...,LConvencoding;
Navigation
[0] Message Index
[#] Next page