Connecting Tech Pros Worldwide Help | Site Map

character sets

Willem Bogaerts
Guest
 
Posts: n/a
#1: Jan 9 '07
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.
http://www.kratz.nl/
william
Guest
 
Posts: n/a
#2: Jan 9 '07

re: character sets


On Tue, 09 Jan 2007 16:17:03 +0100, Willem Bogaerts wrote:
Quote:
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)
no@email.com
Guest
 
Posts: n/a
#3: Jan 9 '07

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="application/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.
Michael Fesser
Guest
 
Posts: n/a
#4: Jan 9 '07

re: character sets


..oO(no@email.com)
Quote:
>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="application/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
Willem Bogaerts
Guest
 
Posts: n/a
#5: Jan 10 '07

re: character sets


>Dear all,
Quote:
Quote:
>>
>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.
http://www.kratz.nl/
Closed Thread


Similar PHP bytes