8

Assume that the site is still in it's design phases so there's no initial work to pick one over the other from the start.

Evan Plaice
  • 1,788
  • 1
  • 15
  • 23

1 Answers1

9

With UTF-8 you have increased flexibility over ISO 8859-1. The former can encode any character included in Unicode while the latter is limited to Western European languages.

ISO 8859-1 ("Latin1") doesn't include, for example, Greek, Hebrew, Arabic, Cyrillic, Chinese, Japanese and Korean, etc.

Dennis Williamson
  • 703
  • 1
  • 6
  • 11
  • Is the LS (line separator) character also supported in HTML or do I still have to use the classic \r\n kludge? – Evan Plaice Jul 13 '10 at 04:59
  • 1
    @Evan: normally you just use \n. – DisgruntledGoat Jul 13 '10 at 12:01
  • @DisgruntledGoat I thought \n was specific to *nix platforms whereas \r is specific to Windows. Don't you need a combination of the two to make the code platform independent? – Evan Plaice Jul 13 '10 at 12:24
  • @Evan: I create content in both Windows and Linux which is hosted by both IIS and Apache in all combinations of edit/host and I never pay any attention to the line endings (which are independent of the encoding, by the way). I think (unfortunately?) that \r\n has graduated from kludge to a de facto standard. (It's actually more "typewriter-like" than Unix line endings.) – Dennis Williamson Jul 13 '10 at 16:17
  • 2
    Decent Windows text editors can use \n or \r\n. – mcrumley Jul 13 '10 at 17:22
  • 1
    @Evan: \n is Linux/Unix, \r is Mac, \r\n is Windows. But you can use any of those for any platform's server as far as I know. I've never had any problems on Windows using just \n. – DisgruntledGoat Jul 14 '10 at 08:57
  • In fact, when dealing with HTML, \n, \r\n, \r and similar characters are all being displayed as a one single whitespace character, unless typed inside
     or viewing the page source…
    
    – Tomer Cohen Jun 26 '11 at 11:16