edit: Ah, I see that Bart hinted at that.
1. yeah. similar but i personally prefer your version because you made use of the declaration in windows unit rather than direct import from kernel32.dll.
2.
I tried to change the font in console, but the system keep display with the font specified in the default profile. how can i override or disable the default command prompt settings?OK I found the answer: (i) I have to run lazarus with administator rights and (ii) when not in IDE, run the apps in command prompt (as admin)
3. actually the main issue i have here is s3 := s1+s2 as s3 may become ???? if some of the setting is not set eg ascii codepage. with the help from all the experts here, this has been solved, but i just want to explore further.