SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict kvnwpts's Avatar
    Join Date
    Mar 2012
    Location
    Helsingborg, Sweden
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Dreamweaver can't read

    Hey there!

    I have a swedish keyboard, and i use to write articles for example. Dreamweaver's design view can read them but as soon as I preview in broswer it looks like this, all these wierd signs is either - Idag håller jag fortfarande på att bygga hemsidan som inom kort tid är klar.

    Sometimes it works on some websites I have and sometimes not, on this it dosent, but on my other it shows it. So its like sometimes yes and sometimes not, And it dosent matter if I write it fom the code view.

    Is there any soloution?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Make sure that
    1) Dw is set to encode pages as UTF-8
    2) Your server sends the page with the UTF-8 encoding
    3) you specify UTF-8 as your encoding in the meta element after your opening <head> tag.

    E.g.

    Code:
    <head>
    <meta charset="utf-8">
    If you want, show us the page in question and we can check your page and server encoding.

    UTF-8 is a more universal character set that recognizes non-roman characters.

  3. #3
    SitePoint Addict kvnwpts's Avatar
    Join Date
    Mar 2012
    Location
    Helsingborg, Sweden
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Oh, thanks. I usually delete <meta charset="utf-8"> in the beginning, in though of its something unnecessary.

    Thanks man again and again!


    Quote Originally Posted by ralph.m View Post
    Make sure that
    1) Dw is set to encode pages as UTF-8
    2) Your server sends the page with the UTF-8 encoding
    3) you specify UTF-8 as your encoding in the meta element after your opening <head> tag.

    E.g.

    Code:
    <head>
    <meta charset="utf-8">
    If you want, show us the page in question and we can check your page and server encoding.

    UTF-8 is a more universal character set that recognizes non-roman characters.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    If you have that meta element but the server is sending out a different encoding, the server setting will override the page setting. Have a look at this current thread:

    http://www.sitepoint.com/forums/show...ages-for-UTF-8

  5. #5
    SitePoint Addict kvnwpts's Avatar
    Join Date
    Mar 2012
    Location
    Helsingborg, Sweden
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I will!
    Quote Originally Posted by ralph.m View Post
    If you have that meta element but the server is sending out a different encoding, the server setting will override the page setting. Have a look at this current thread:

    http://www.sitepoint.com/forums/show...ages-for-UTF-8

  6. #6
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    9 times out of 10, that meta is redundant (as long as you are using latin-only English characters). But anytime you go beyond A-Z, 0-9 and punctuation marks, you should always specify an encoding (usually UTF-8 is your safest bet).

  7. #7
    SitePoint Addict kvnwpts's Avatar
    Join Date
    Mar 2012
    Location
    Helsingborg, Sweden
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yep. From now on I guess I'll choose that one always :P.
    Quote Originally Posted by samanime View Post
    9 times out of 10, that meta is redundant (as long as you are using latin-only English characters). But anytime you go beyond A-Z, 0-9 and punctuation marks, you should always specify an encoding (usually UTF-8 is your safest bet).

  8. #8
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Also, declaring the meta tag helps avoid an unusual (and unlikely) hack, known as the UTF-7 hack.
    http://www.joelonsoftware.com/articles/Unicode.html
    search for "utf-7" to specifically read about it.

    For this reason my meta tag is the first thing in the <head>, even before the title. Joel also mentions how browsers will stop at that tag and go back knowing they are reading things now with the right encoding (never mind that what the server states in the HTTP Header always takes precedence... sometimes that Header isn't there at all). So I might be saving a nanosecond of time for the browser : )

  9. #9
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Arg, sorry, the Joel article doesn't mention the hack, just UTF-7 in general.

    But I brought it up so first Wikipedia has a little bit about it but then in case you thought this really was only old IE read more here.

    Also Google had security holes based on utf-7 which makes this encoding seem more and more interesting :)


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
  •