Forum Moderators: open

Message Too Old, No Replies

Adding Japanese to html pages

Editor won't hold the changes

         

chrisinoz

7:07 am on Feb 21, 2009 (gmt 0)

10+ Year Member



Hi

Client sent me some Japanese text. I pasted it fine into a text editor that supports Unicode UTF-8. I saved the php document and when I opened the document it changed to ?3?9 etc.

I have readup on this on the web and am using
this in my header.

<!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>Yumi Books - Golf tactile book</title>
<META http-equiv="Content-Type" Content="text/html; charset=euc-jp">

<meta http-equiv="content-language" content="ja">

Any ideas please?

Thanks
Chris

chrisinoz

7:44 am on Feb 21, 2009 (gmt 0)

10+ Year Member



Twit I was

I wasn't saving it as Unicode (UTF-8) and I ticked use byte order mark (BOM) for unicode files.

BTW is the header tabs correct?

Cheers

bill

11:37 am on Feb 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If the text is UTF-8 encoded then the page should be as well. Don't use the euc-jp charset unless that's the way the text is encoded.

chrisinoz

8:13 am on Feb 23, 2009 (gmt 0)

10+ Year Member



Thanks _ I am learning something new here. I have the option to save as (Japanese)Shif-Jis also - so I would then amend that html line to

<META http-equiv="Content-Type" Content="text/html; charset=Shift-Jis">

Correct?

Now to find out what is the best option to use.

Thanks
Chris

choster

9:00 am on Feb 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, UTF-8 is UTF-8, not EUC-JP or shift-JIS.

<meta http-equiv="Content-Type" Content="text/html; charset=UTF-8" />

(note also that meta should be in lowercase and closed in XHTML).

chrisinoz

9:27 pm on Feb 23, 2009 (gmt 0)

10+ Year Member



Thanks Choster