character sets

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Willem Bogaerts

    #1

    character sets

    Dear all,

    I develop web applications on a Windows machine and upload the files to
    a Linux server. When I look at any output (on the site, in a console
    window, etc.), it appears in a different character set. Not very
    surprising, but not pleasant either. My problem is that I do not know
    where it goes wrong.

    I upload the files with WinSCP(SFTP). My guess is that that is one of
    the steps where it goes wrong. I cannot upload to another character set,
    but I upload the files as text. As far as I know, that corrects only
    line-terminations.

    Filling databases is usually also done from a Windows machine, either
    directly through a SSL tunnel to the database or through a browser
    running on Windows. Both ways of entering data into the database also
    show diacriticals as strange character sequences. The database text
    fields (MySQL) all have a character set of "Latin-1" and have the
    corresponding case-insensitive collation.

    Setting the PHP character set in PHP.INI seems to have no effect at all.

    Is there something else I could try?
    Am I missing something?

    Best regards

    --
    Willem Bogaerts

    Application smith
    Kratz B.V.

  • william

    #2
    Re: character sets

    On Tue, 09 Jan 2007 16:17:03 +0100, Willem Bogaerts wrote:
    Dear all,
    >
    I develop web applications on a Windows machine and upload the files to
    a Linux server. When I look at any output (on the site, in a console
    window, etc.), it appears in a different character set. Not very
    surprising, but not pleasant either. My problem is that I do not know
    where it goes wrong.
    do you know at least where the problem is ?

    http or mysql ?
    i know that Redhat apache is set to send in utf-8 (unicode)

    Comment

    • no@email.com

      #3
      Re: character sets

      well, i had a similar problem and solved it by encoding my index.html
      with utf-8, by adding this meta tag:

      <meta http-equiv="content-type" content="applic ation/xhtml+xml;
      charset=UTF-8" />

      now every odd characters i add to database through web form are
      displayed exactly as i've typed them.

      hope it helps.

      Comment

      • Michael Fesser

        #4
        Re: character sets

        ..oO(no@email.c om)
        >well, i had a similar problem and solved it by encoding my index.html
        >with utf-8, by adding this meta tag:
        >
        ><meta http-equiv="content-type" content="applic ation/xhtml+xml;
        >charset=UTF-8" />
        That doesn't solve the problem and is completely meaningless in XHTML.
        Additionally I doubt that you're really delivering all your pages as
        application/xhtml+xml, because they won't work in IE. That means that
        the above declaration most likely contradicts what the server sends
        actually.

        The correct way is to configure the web server accordingly, so that the
        used character encoding is sent along with the content type in the HTTP
        response header. These meta-http-equiv crutches don't serve any purpose
        in the WWW. They may be useful for locally stored documents, but that's
        another story.

        Micha

        Comment

        • Willem Bogaerts

          #5
          Re: character sets

          >Dear all,
          >>
          >I develop web applications on a Windows machine and upload the files to
          >a Linux server. When I look at any output (on the site, in a console
          >window, etc.), it appears in a different character set. Not very
          >surprising, but not pleasant either. My problem is that I do not know
          >where it goes wrong.
          >
          do you know at least where the problem is ?
          >
          http or mysql ?
          i know that Redhat apache is set to send in utf-8 (unicode)
          Both. I see the strange characters in web pages, in php-created PDF
          files (using FDPF), and in the command-line mysql client if I use a
          terminal connection through SSL using putty. All texts come from the
          database (otherwise I would have used HTML entities in the first place)
          and are translated to HTML with the htmlentities() function.

          Now I write this, I see there is a parameter to this function that I can
          try.

          --
          Willem Bogaerts

          Application smith
          Kratz B.V.

          Comment

          Working...