Results 1 to 2 of 2

Thread: Character encoding in <title>

  1. #1
    New user
    Join Date
    07-05-10.
    Posts
    1

    Default Character encoding in <title>

    Hi,

    I'm having problems with the character encoding inside tags from the head section, used by search engines and other sites such as facebook to gather information about a link.

    I'm talking specifically about the <title> tag and the <meta name="description">. Typically in facebook, when you want to share a link, their application will read information about your link in these tags. No matter how I try to change the character encoding of my documents, this information gathered from the head section of my pages always appear corrupted on third party sites.

    The title of my homepage is:
    La bière artisanale de l'Ouest lausannois - Buse

    This shows fine in any combination of browser/OS I've tested. Charset is set as utf-8 by apache as well as in the document, always gets detected as such by the user agents.

    But when I try to share a link on facebook (note that the problem also appears with many search engines) I get this:
    La bière artisanale de l'Ouest lausannois - Buse

    This looks to me as if a utf-8 string is rendered as ISO-8859-1

    The same problem appears with a few websites from your case studies (http://www.netzniesser.net/ http://www.ostseefibel.de/) which makes me think it might be related to contao.

    I've tried a few .htaccess directives to force the charset to utf-8 (AddDefaultCharset, ForceType) without any success. When I checked the http headers sent by the server, everything looks fine, content type is text/html, character set UTF-8. The entire site was coded in utf-8, everything in the database is stored as utf-8 and defined as such, as far as I know everything is utf-8.

    When facebook imports other data than what's in the head section of my pages (news posts, article teasers) it shows properly.

    These character encoding problems really confuse me, I guess it's likely that I'm doing something wrong and obvious but I don't see it.

    here's my web site: http://www.bierebuse.ch

    Thanks if anyone can help.

    Alex

  2. #2
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Character encoding in <title>

    Internet Explorer says:This website contains letters or symbols that cannot be displayed with the current language settings.
    Why am I seeing this? says:

    What are International Domain Names?

    International Domain Names (IDN), are web addresses that are displayed in non-ASCII character sets or alphabets in the Internet Explorer Address bar. This allows websites to display their address using their native language and character set.

    For security purposes, Internet Explorer will display International Domain Name web address in a standard ASCII text encoding by default.

    The standard text encoding is used because it's possible for letters and symbols in some languages to be used to impersonate English language websites for phishing scams. If you browse to a website with a native language address, but you don't have the language available, the Information bar will display the message "This web address contains letters or symbols that cannot be displayed with the current language settings. Click here for options."

    If you frequently visit websites that are written in languages that you cannot currently view, you might want to install additional languages in Internet Explorer. When the message appears on the Information bar, click Change language settings, and follow the prompts on your screen.
    Your domain name http://www.bierebuse.ch
    redirects to http://www.xn--birebuse-20a.ch/ for me in Internet Explorer, but to
    http://www.bièrebuse.ch/
    in Firefox. Maybe this has something to do with it??

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
  •