SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast Marcelo's Avatar
    Join Date
    Oct 2003
    Location
    Buenos Aires
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML Special Characters

    I send a newsletter periodically to some members. I have some comments from people who receive html special characters instead of characters themselves.

    Something like this:

    This ‘Planning Project’ - Complete!

    Why some people receive it ok and some others like the line above?

    Thanks,
    Marcelo

  2. #2
    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)
    I suspect it depends on the character encoding used for the e-mails.

  3. #3
    SitePoint Enthusiast Marcelo's Avatar
    Join Date
    Oct 2003
    Location
    Buenos Aires
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder
    I suspect it depends on the character encoding used for the e-mails.
    And how exactly you solve this? Most people receive newsletter ok. Is there a way to solve this problem for people who receive these html charset without affecting the other people who can read it ok?

    Thanks,
    Marcelo

  4. #4
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The character encoding and character set used do not affect named entities - that's the whole point of using named entities.

    The only thing I can think of is that the client simply does not recognise the entities ‘ and ’ There's a few things you could do about this:

    Consider not using named entities, and encoding those characters as literals. You'd need to be using a character set that supported those characters (pretty much everything except us-ascii).

    Consider converting these characters to characters that are available in us-ascii. This will ensure that all people will be able to see them. For instance, use ' and ', or ` and '.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  5. #5
    SitePoint Enthusiast Marcelo's Avatar
    Join Date
    Oct 2003
    Location
    Buenos Aires
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mmj
    The character encoding and character set used do not affect named entities - that's the whole point of using named entities.

    The only thing I can think of is that the client simply does not recognise the entities ‘ and ’ There's a few things you could do about this:

    Consider not using named entities, and encoding those characters as literals. You'd need to be using a character set that supported those characters (pretty much everything except us-ascii).

    Consider converting these characters to characters that are available in us-ascii. This will ensure that all people will be able to see them. For instance, use ' and ', or ` and '.
    I understand this. Then, how do I change the character encoding and character set so everybody can receive this mail with us-ascii? It won't be a problem (I think) since newsletter is all English.

    Thanks,
    Marcelo

  6. #6
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Marcelo
    I understand this. Then, how do I change the character encoding and character set so everybody can receive this mail with us-ascii? It won't be a problem (I think) since newsletter is all English.

    Thanks,
    If you want everything to be compatible with ascii, then you should either convert all characters to a character that is in ascii like ` and ', or use named character entities such as ‘ and ’. The latter is a better way of doing it, but obviously some mail readers don't recognise these, so I'd say convert them to ` and/or '.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff


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
  •