I'm trying to write simple application using sockets in Java to read only headers from mail server reading line by line. The problem is that sometimes mail subject has different charset ( iso-8859-2 ) and i can not display properly some special characters.What is the proper way to display special characters while using System.out.println("ńł") ? I know i have to use "String s.get bytes" but either way it does not work. Is there any possibility to display special characters properly. Maybe i'm doing something wrong ( i'm new to java ) but after spending almost a week checking out different codes i'm getting tired. Here's is the simple code from example testing application ( not original ):I'm trying to write simple application using so