RE: [PHP] Japanese on a page

This is a discussion on RE: [PHP] Japanese on a page within the PHP General forums, part of the PHP Programming Forums category; - Edwin - <mailto:copperwa11s@yahoo.co.jp> on Tuesday, September 16, 2003 5:53 PM said: This japanese page ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-17-2003
Chris W. Parker
 
Posts: n/a
Default RE: [PHP] Japanese on a page

- Edwin - <mailto:copperwa11s@yahoo.co.jp>
on Tuesday, September 16, 2003 5:53 PM said:

This japanese page thing was a project I started at home so now that I'm
at work I'll do my best to respond using my memory (good luck, me!).

> Did you check if the Japanese characters are readable inside
> html-kit? In other words, Japanese characters should appear as it is
> inside your editor...


No the japanese characters did not appear correctly.

>> 7. Save the page

>
> Did you save it as euc-jp or shift_jis?


No. I don't think there is that option in html-kit, but I think that
this may be the key.

If you (a person) can save the file as the proper type there's probably
no reason to send the header() function, or for that matter there would
probably be no REASON to send the header().

>> 8. open it in the web browser

>
> Before opening it in your browser, did you try opening again in your
> editor just to see whether you saved it correctly?


No.

>> 9. cry because it doesn't work

>
> Hmm... If everything is properly declared inside your <head> tags,
> your browser *should* automatically render the page correctly.
> Anyway, if it doesn't work, check that the "character coding" in your
> browser is properly selected. (If you're on Netscape or Mozilla,
> choose "View" -> "Character coding" -> your_character_coding_here.)


Yes this is how I would expect it to work but it ended up not working
that way. But like I said I think it may be because of the type it saves
the file as.

>> A friend later figured out that the header() declaration at the top
>> of the page was what made the difference.

>
> Did this one work for you?


Yes, adding the header() made the page display correctly from my server.

>> Do you know why it wouldn't work until that php code was added?

>
> Not really sure. But think about this. People can write HTML pages
> without the help of php and the like and still have Japanese pages
> correctly rendered by their browsers. In other words, I can write an
> HTML page with Japanese characters in it, save it on my desktop (and
> not on my web server), double click it, my browser starts and show me
> the characters correctly--no php code necessary.


That's how I expected it to work.


> Btw, iirc, phpedit on Win2k worked for me. Just make sure that you
> have Japanese fonts (and an IME) installed and you chose the correct
> (default) font for phpedit. This works even if you have on English
> version of Win2k (or XP).


Oh cool. I have that already so I'll try it out.


Chris.
Reply With Quote
  #2 (permalink)  
Old 09-18-2003
- Edwin -
 
Posts: n/a
Default Re: [PHP] Japanese on a page


"Chris W. Parker" <cparker@swatgear.com> wrote:

> - Edwin - <mailto:copperwa11s@yahoo.co.jp>
> on Tuesday, September 16, 2003 5:53 PM said:
>
> This japanese page thing was a project I started at home so now that I'm
> at work I'll do my best to respond using my memory (good luck, me!).
>
> > Did you check if the Japanese characters are readable inside
> > html-kit? In other words, Japanese characters should appear as it is
> > inside your editor...

>
> No the japanese characters did not appear correctly.


Ok, there is/was an issue with html-kit not showing Japanese characters properly but they are *still* Japanese. Anyway,...

> >> 7. Save the page

> >
> > Did you save it as euc-jp or shift_jis?

>
> No. I don't think there is that option in html-kit, but I think that
> this may be the key.


Maybe. But since I haven't used html-kit that much, and I don't really know how it saves the files, most probably it saves it shift_jis (sjis) so it worked when you used header().

....[snip]...

> >> A friend later figured out that the header() declaration at the top
> >> of the page was what made the difference.

> >
> > Did this one work for you?

>
> Yes, adding the header() made the page display correctly from my server.


Then, most likely, the correct charset wasn't properly defined inside the <head> tags.

....[snip]...

> > Btw, iirc, phpedit on Win2k worked for me. Just make sure that you
> > have Japanese fonts (and an IME) installed and you chose the correct
> > (default) font for phpedit. This works even if you have on English
> > version of Win2k (or XP).

>
> Oh cool. I have that already so I'll try it out.


Great! but choosing the default font for phpedit is bit tricky. You won't "see" the names of the Japanese fonts inside the drop-down menu as they appear as blank lines or with an "@" sign in front. Just do a trial-and-error and soon you'll find one that works.

And oh btw, there's Quanta for Windows available at thekompany.com. You have to pay for it though... But not much ;)

- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0