What determines if you can see foreign text like japanese or korean on the browser?

For example, i spend a lot of time looking at korean sites. sometimes they display properly and sometimes it displays something like $&@A;::%$$^#@

Is it something in the header that controls this or how the page was written?