It's really the site's server that set the encoding. This is what SP puts out:
It happens to be the same as what's placed in the <head> in the HTML, but if it were different, the server version would win out. (I gather the main reason to have it in the <head> of the document is for when you are viewing pages offline.)
I am not understanding how you are supposed to dictate how a page is displayed...
Do you set this on the Server?
Yes. If you don't like the encoding your server puts out, then you can change it. It's most likely to be UTF-8 these days, though, which is what it should be.
But what happens when I upload my code to my VPS?
If your remote server puts out a different encoding, there's a small chance things might change a bit on your site, so it's good to make sure your local server mirrors the settings on the remote server (encoding, PHP versions etc.)
Looks like this thread just went from HTML to PHP!
Your original question implied the use of JS or PHP (for sorting etc.), but JS is the standard way to go, whether you like it or not. But obviously it can be done with PHP.