Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: charsets

  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    charsets

    Hi, what charset do i have to use if i want ë (so with the two dots above it) to be displayed normally instead of it being changed into a question mark or something else and without having to put a special code on every place where an ë has to be?

    THANK YOU FOR YOUR HELP!!
    Arne

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    UTF‐8 displays pretty much everything. Specifying the encoding in code or HTTP form isn’t enough though. You need to actually save the document as a UTF‐8–encoded file in your code editing program.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    Regular Coder
    Join Date
    Aug 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, utf-8 doesn't display it correctly. It changes it into a square sign. Anyway, i use notepad or something like that and it doesn't change signs while saving so that can't be the problem. Do you know another charset?
    THANK YOU
    arne

  • #4
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    notepad is the problem: it can't save as utf-8, even if you select that in "save as...".

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello arne2,
    I have several websites that have the ë and they all use
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    I never had any trouble with notepad either...
    Are you entering the that ë by pressing ALT 0235 ?
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Quote Originally Posted by Excavator View Post
    Hello arne2,
    I never had any trouble with notepad either...
    That's because you're not using UTF-8

  • #7
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Quote Originally Posted by arne2 View Post
    Well, utf-8 doesn't display it correctly. It changes it into a square sign. Anyway, i use notepad or something like that and it doesn't change signs while saving so that can't be the problem. Do you know another charset?
    UTF‐8 should be working fine. This document demonstrates it. It was also encoded in Microsoft Notepad.

    Quote Originally Posted by croatiankid View Post
    notepad is the problem: it can't save as utf-8, even if you select that in "save as...".
    Hmm? Actually it can.

    Quote Originally Posted by Excavator View Post
    I have several websites that have the ë and they all use
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    ISO-8859-1 is a viable alternative to UTF‐8 that includes the ë character, though I’m not sure why one would choose a more limiting character encoding. I see sites encoded with that, then someone comes along and leaves a comment with characters outside of the encoding and the message ends up not getting displayed properly. It also means that if you want to directly input more exotic characters later on, such as symbols and Asian characters, then you have to change the encoding; seems to make more sense just to use UTF‐8 from the start.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #8
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    seems to make more sense just to use UTF‐8 from the start.
    __________________
    Yes it does.
    I'll do a little testing to just to make sure and then switch.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #9
    Regular Coder
    Join Date
    Aug 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's still not working. Here is my full code:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    >
    <!-- 
    saved from url=(0014)about:internet -->
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    title>Progeria</title>
      <
    link rel="stylesheet" href="progeria.css">


    <!--
    Fireworks 8 Dreamweaver 8 target.  Created Mon Jan 22 22:10:46 GMT+0100 (Romance (standaardtijd)) 2007-->
    </
    head>
    <
    body>
    <
    class="MsoNormal" style="line-height:150%">
    <
    span style="font-family: Times New Roman; font-weight: 700; text-decoration: underline">
    <
    font size="4">Behandeling</font></span></p>
    <
    class="MsoNormal" style="line-height:150%">&nbsp;<br>
    Een behandeling die Progeria
    geneest is nog niet ontdekt
    maar onderzoekers van het kankerinstituut in
    Zimbabwe hebben aangetoond dat de functie van progeriacellen beïnvloed kan
    worden met behulp van een soort genetische ‘pleister’
    Het lijkt erop dat zij
    in staat zijn het defect te repareren door in het laboratorium een synthetische
    DNA
    -structuur aan de cel toe te voegenDeze gentherapie is enkel mogelijk met
    cellen in laboratoriumcellen
    maar de volgende stap is om deze gentherapie uit
    te proberen op muizen met Progeria
    Men kan niet voorspellen wanneer dit ver
    genoegd zal ontwikkeld zijn om deze techniek op progeriakinderen toe te passen
    .
    Maar het is ook heel goed om te weten dat er zo hard wordt gewerkt en men
    steeds weer een stapje dichter bij een mogelijke therapie komt
    .</p>

    <
    class=MsoNormal style='line-height:150%'>Behandelingen zijn van kind tot kind andersEr moet steeds worden
    afgewogen in hoeverre medische hulp noodzakelijk is
    Men moet het kind niet met
    overmatige zorg en medicatie belasten
    Of men al dan niet een behandeling
    start
    wordt door de artsen en de ouders besprokenMen weegt ook steeds af in
    hoeverre deze belasting van de behandeling opweegt tegen de vermoedde effecten
    .
    Het kind medicatie geven tegen bijvoorbeeld pijn in zijn spiertjes of elders
    wordt wel meer gedaan
    .</p>

    <
    class=MsoNormal style='line-height:150%'>Behandelingen die men ooit
    probeerde
    maar die geen resultaat opleverden:</p>

    <
    ul>
      <
    li>

    <
    class=MsoNormal style='margin-left:53.4pt;text-indent:-18.0pt;line-height:
    150%;mso-list:l0 level1 lfo1;tab-stops:list 53.4pt'
    >Behandeling met menselijke groeihormonen hebben
    op kinderen met Progeria niet geholpen
    Deze behandeling wordt ook niet meer
    toegepast
    want men kan niet uitsluiten dat het groeihormoon het
    verouderingsproces versnelt
    .</p>

      </
    li>
      <
    li>

    <
    class=MsoNormal style='margin-left:53.4pt;text-indent:-18.0pt;line-height:
    150%;mso-list:l0 level1 lfo1;tab-stops:list 53.4pt'
    >Het toedienen van een dierlijk groeihormoon
    lijdt ook niet tot een genezing
    De ouders van Progeriapatiëntje die met deze
    celtherapie zijn behandeld
    vonden wel dat de kinderen er baat bij haddenmaar
    deze medicatie is zeer omstreden en in enkele landen is deze behandeling niet
    toegestaan
    onder andere in Nederland. </p>

      </
    li>
      <
    li>

    <
    class=MsoNormal style='margin-left:53.4pt;text-indent:-18.0pt;line-height:
    150%;mso-list:l0 level1 lfo1;tab-stops:list 53.4pt'
    >Hartchirurgie werd bij progeriapatiëntje ook
    toegepast
    maar dit had een beperkt effectZo’n operatie houdt ook grote
    gezondheidsrisico’s in voor het kindje met Progeria
    . </p>

      </
    li>
    </
    ul>
    </
    body>
    </
    html
    You can see it online here http://www.webmasterhelp.biz/gipvincent/behandeling.php

    As you can see it isn't displaying the signs correctly as you see squares and stuff like that. Please help!! THANK YOU

  • #10
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    So what advice have you tried to follow?

    I don't see any meta tag as the one Excavator first suggested. Currently there is no information about encoding in your page. Neither as HTML <meta> tag nor in HTTP header. This last thing I can see using Live HTTP headers plugin for Firefox.
    Code:
    Content-Type: text/html
    You cannot expect your page to be rendered correctly with no information about encoding. Your page is not UTF-8, but rather iso-8859-1. Put in Excavator's meta tag and see what it resolves.

  • #11
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Quote Originally Posted by arne2 View Post
    It's still not working.



    As you can see it isn't displaying the signs correctly as you see squares and stuff like that.
    I see no squares in Firefox or Internet Explorer 6/7. All characters seem to be rendered correctly even though the page is being defaulted to the Windows‐1252 encoding.

    Anyway, there are three ways to set the encoding. First you must save the document under the correct encoding, then use one or more of the following:
    • HTTP header: Content-Type: text/html; charset=UTF-8
    • XML declaration: <?xml encoding="UTF-8"?>
    • meta element: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> (HTML only)

    If you decide to use the meta element in an XHTML document to set the encoding, you should also use the XML declaration or HTTP header to set it since that method of setting the encoding is ignored by an XML parser. If you want Internet Explorer 6 compatibility, then you’ll probably want to use the HTTP header method instead of the XML declaration method. Alternatively, you could use HTML instead of XHTML so that you can just stick with the easy to use meta element.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #12
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    I think this is a local problem on your machine. Maybe you don't have a machine font installed that you should?
    I can see the ë you entered and I entered several more special characters that work fine.
    It seems when you have no character encoding it seems to default back to UTF-8. You should still specify it with
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />



    It displays all the special characters I entered, look at the bottom:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    <!-- saved from url=(0055)http://www.webmasterhelp.biz/gipvincent/behandeling.php -->
    <!-- saved from url=(0014)about:internet --><HTML 
    xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Progeria</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=windows-1252"><LINK 
    href="progeria.css" rel=stylesheet><!--Fireworks 8 Dreamweaver 8 target.  Created Mon Jan 22 22:10:46 GMT+0100 (Romance (standaardtijd)) 2007-->
    <META content="MSHTML 6.00.5744.16384" name=GENERATOR></HEAD>
    <BODY>
    <P class=MsoNormal style="LINE-HEIGHT: 150%"><SPAN 
    style="FONT-WEIGHT: 700; FONT-FAMILY: Times New Roman; TEXT-DECORATION: underline"><FONT 
    size=4>Behandeling</FONT></SPAN></P>
    <P class=MsoNormal style="LINE-HEIGHT: 150%"><BR>Een behandeling die Progeria 
    geneest is nog niet ontdekt, maar onderzoekers van het kankerinstituut in 
    Zimbabwe hebben aangetoond dat de functie van progeriacellen beïnvloed kan 
    worden met behulp van een soort genetische ‘pleister’. Het lijkt erop dat zij in 
    staat zijn het defect te repareren door in het laboratorium een synthetische 
    DNA-structuur aan de cel toe te voegen. Deze gentherapie is enkel mogelijk met 
    cellen in laboratoriumcellen, maar de volgende stap is om deze gentherapie uit 
    te proberen op muizen met Progeria. Men kan niet voorspellen wanneer dit ver 
    genoegd zal ontwikkeld zijn om deze techniek op progeriakinderen toe te passen. 
    Maar het is ook heel goed om te weten dat er zo hard wordt gewerkt en men steeds 
    weer een stapje dichter bij een mogelijke therapie komt.</P>
    <P class=MsoNormal style="LINE-HEIGHT: 150%">Behandelingen zijn van kind tot 
    kind anders. Er moet steeds worden afgewogen in hoeverre medische hulp 
    noodzakelijk is. Men moet het kind niet met overmatige zorg en medicatie 
    belasten. Of men al dan niet een behandeling start, wordt door de artsen en de 
    ouders besproken. Men weegt ook steeds af in hoeverre deze belasting van de 
    behandeling opweegt tegen de vermoedde effecten. Het kind medicatie geven tegen 
    bijvoorbeeld pijn in zijn spiertjes of elders wordt wel meer gedaan.</P>
    <P class=MsoNormal style="LINE-HEIGHT: 150%">Behandelingen die men ooit 
    probeerde, maar die geen resultaat opleverden:</P>
    <UL>
      <LI>
      <P class=MsoNormal 
      style="MARGIN-LEFT: 53.4pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 53.4pt">Behandeling 
      met menselijke groeihormonen hebben op kinderen met Progeria niet geholpen. 
      Deze behandeling wordt ook niet meer toegepast, want men kan niet uitsluiten 
      dat het groeihormoon het verouderingsproces versnelt.</P>
      <LI>
      <P class=MsoNormal 
      style="MARGIN-LEFT: 53.4pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 53.4pt">Het 
      toedienen van een dierlijk groeihormoon lijdt ook niet tot een genezing. De 
      ouders van Progeriapatiëntje die met deze celtherapie zijn behandeld, vonden 
      wel dat de kinderen er baat bij hadden, maar deze medicatie is zeer omstreden 
      en in enkele landen is deze behandeling niet toegestaan, onder andere in 
      Nederland. </P>
      <LI>
      <P class=MsoNormal 
      style="MARGIN-LEFT: 53.4pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 53.4pt">Hartchirurgie 
      werd bij progeriapatiëntje ook toegepast, maar dit had een beperkt effect. 
      Zo’n operatie houdt ook grote gezondheidsrisico’s in voor het kindje met 
      Progeria. </P></LI></UL>
      
      ë  	Ã     ¶    ½     §
      
      </BODY></HTML>
    Goto http://support.microsoft.com/default.aspx/kb/314960
    and maybe http://plato.stanford.edu/special-characters.html to see if you need to load a font to be able to display special characters on your machine.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #13
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Quote Originally Posted by Excavator View Post
    It seems when you have no character encoding it seems to default back to UTF-8.
    The Validator is falling back to the UTF‐8 encoding because he’s using an XHTML DTD and the Validator assumes an XML media type. You’ll note that the Validator also failed to validate the document due to encoding errors, which means that the document itself was not saved as a UTF‐8–encoded file.

    I believe that XHTML with an XML media type is supposed to fall back to UTF‐8 if no encoding is specified. Even if UTF‐8 were the chosen encoding, the encoding should still be specified, however, especially since this XHTML document is supposed to be compatible with both XML and HTML.

    Or, he could switch to HTML 4.01 and just use a meta element, as your code demonstrates. I think that that’s the better option actually.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #14
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    I just can't figure out why arne2 is having such trouble with characters. I can display them no matter what DocType or character encoding I use or don't use. In fact, I can't seem to make a test file here locally that WON'T display special characters.

    That's why I thought he must be missing a font on his machine.
    Especially when he said this:
    As you can see it isn't displaying the signs correctly as you see squares and stuff like that. Please help!! THANK YOU
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #15
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Quote Originally Posted by Excavator View Post
    I just can't figure out why arne2 is having such trouble with characters. I can display them no matter what DocType or character encoding I use or don't use. In fact, I can't seem to make a test file here locally that WON'T display special characters.
    Hmm… Well, here’s a list of fonts with the character. I would think that he’d at least have something like Arial. The only time I encounter squares when trying to type special characters is in Windows Live Messenger (home) and Microsoft Office Word 2003 (college). Maybe if we knew which browsers or programs these squares were occurring in…
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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