SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    UTF-8 encoding in SitePoint Books.

    This more a remark for the writers of the SitePoint books.

    I have the book 'HTML Utopia, Designing Without Tables'.

    In this book, the iso-8859-1 encoding is used in all examples. So, I just copied that for my own pages.

    Until recently. I had to make a guestbook that had also to work with Cyrillic. So, I had to learn about encodings etc. I did everything in UTF-8 and it works fantastic.

    The impact of using UTF-8 is very minor (using mb_strlen instead of strlen in PHP). And I consider the other encodings legacy. I will do new projects in UTF-8, even when it is not directly necessary.

    So, my suggesting to SitePoints, is to update your books and make the examples with UTF-8 encoding. In this way, new programmers don't learn the legacy solutions.

    Regards,

    Lucas

  2. #2
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Agree.
    Simon Pieters

  3. #3
    Non-Member
    Join Date
    Apr 2006
    Location
    Scotland
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But for the majority of people UTF* is not needed, and will make things more complicated. (eg saving things in utf8 - notepad cant do that (i think?) which is what some people use)

  4. #4
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mikexx2020 View Post
    (eg saving things in utf8 - notepad cant do that (i think?) which is what some people use)
    Notepad can save in utf-8, but only with the BOM present.
    Simon Pieters

  5. #5
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    It is not more complicated

    Well, my experience was, that it is not more complicated.
    That was my suprise. My first thought was, oh oh, Unicode (of course I knew what it was), this is giving me headaches.

    The notepad argument is not valid. Because for all HTML code, that is not generated, you hardly use any characters in the range 128-255. And if so, you can use &imul; etc or &#...; codes.

    Only in PHP, you sometimes have to be aware that you are dealing with an UTF-8 string.

    Atlhough you don't need it, you have a good growth pad for internalization. You never know what happens with your software.

    I looked to the sites, that use UTF-8. Google is using it, Wikipedia (English), but not Yahoo. And tested Yahoo mail, indeed can not receive messages in UTF-8 properly. Rather stupid. And it would not be a problem, if they started with it from the beginning. Now, they have a problem to get it all fixed.

    Lucas

  6. #6
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Mighty UTF-8 is good yes! ISO-8859-1 is for amateurs.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •