Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: char set encoding |
|
Author |
|
chuck1rar
Joined: 07 Feb 2006 Posts: 13
|
Posted: Tue 07 Feb '06 16:57 Post subject: char set encoding |
|
|
Am running apache 2.5 on windows 2003 machine with CF MX7.
Have not changed the default settings for char set encoding.
Have 2 websites that are encoded using for english char sets and another website that must display Japanese SJIS.
Problem seems to be on apache.
Have tested the CF app server and when I run CF locally using inbuilt web server then all is fine.
But on the production server with apache my pages are not displayed accordingly. Not a browser issue as I will swap the encoding to sjis but it all comes out garbled...also my pages use sjis in the page encoding and it also works in development mode.
So after resonable deduction must be something with apache..
But the default settings already have sjis as a char set and also ja as a language...
What should I be looking at??? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 08 Feb '06 11:38 Post subject: |
|
|
If you work with PHP I found another solution
Code: |
<?php
$charsets = array(
'iso-8859-1', // default
'iso-8859-2',
'iso-8859-15',
'utf-8');
$pref = http_negotiate_charset($charsets, $result);
if (strcmp($pref, 'iso-8859-1')) {
iconv_set_encoding('internal_encoding', 'iso-8859-1');
iconv_set_encoding('output_encoding', $pref);
ob_start('ob_iconv_handler');
}
print_r($result);?>
|
|
|
Back to top |
|
chuck1rar
Joined: 07 Feb 2006 Posts: 13
|
Posted: Wed 08 Feb '06 11:58 Post subject: language |
|
|
Found the problem..
I needed to add <html langauage ja> to each page..
I thought by just having the char set was enough but obviously not.
Thanks |
|
Back to top |
|
|
|
|
|
|