This slogan or motto is written in Chinese, though it comes from Korea. I have wondered many years what does it mean. Thank you for your help to understand it.
EDIT: Thanks to the answers so far, I have found more information. Here is the University where this motto is promoted in the very old days. It remains displayed there on a small building, which maybe was at the entrance to the university in the old days.
There is a Korean translation there in the article, however even that is obscure to a modern Korean speaker. I think I will try a Korean translation section too.
周而弗比 乃君子之公心 比而不周 寔小人之私心 / 두루 사귀되 가리지 않음은 곧 군자의 공심(公心)이고, 가려 사귀되 두루치 않음은 바로 소인의 사심(私心)이다.
EDIT 2: The reply in the comment below is reasonably meaningful and thoughtful attempt of translation to English.
"All-inclusive but not narrow-minded, this is the selflessness of the gentleman; narrow-minded but not all-inclusive, this is truly the selfishness of the petty man."