//break after exit function CodePageToCodePageName(cp: TSystemCodePage): AnsiString; .. begin ... if FoundCp = cp then begin Exit(CodePageNames[I].name); Break; end; -- Regards, Alexey