1 Replies - 927 Views - Last Post: 11 November 2009 - 08:07 PM

#1 zeptimius  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 11-November 09

Japanese/English mixed Web page won't display on site

Posted 11 November 2009 - 05:14 PM

Hi everyone,

I've been writing a number of Web pages on my Windows XP box using the jEdit editor and checking them locally in Firefox. These pages contain Japanese characters and English, and both look OK on my local computer (loaded as file://yadayada).

But when I upload these pages to a folder on my Web site (hosted by a 3rd party), the Japanese looks crap. Specifically, the page displays lots of 'a'-with-tilde characters, and tiny numbers in squares. Some site showed examples of what badly encoded French would look like if UTF-8 was expected but ISO-8859-1 was found, and it looks like that (I typed some French to verify this). Smells like an encoding problem, but all my settings/options/etc in jEdit say that this file is encoded in UTF-8.

Here's the start of my HTML page. Are there any glaringly obvious mistakes?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja">
<head>

<title>Japanese particles</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta http-equiv="content-language" content="ja">
<link rel="stylesheet" type="text/css" href="styles.css"/>
</head>
<body>
...
</body>



I'm attaching the file in question.

Attached File(s)



Is This A Good Question/Topic? 0
  • +

Replies To: Japanese/English mixed Web page won't display on site

#2 zeptimius  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 11-November 09

Re: Japanese/English mixed Web page won't display on site

Posted 11 November 2009 - 08:07 PM

SOLVED

Some more Googling revealed the answer:
I added the following lines to the .htaccess file which was already in the folder where my files lived:
AddType text/html;charset=UTF-8 html
AddType text/plain;charset=UTF-8 txt


This did the trick, all Japanese is now displaying perfectly.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1