View topic - Japanese in html
Japanese in html
10 posts
• Page 1 of 1
Japanese in html
Does anyone know how to put in Japanese when using html for a website? I have been looking but haven't figured out how to do it yet.
- noisyturtle
- Posts: 20
- Joined: Thu 01.11.2007 1:46 am
RE: Japanese in html
I hardly know anything about html itself, but I would say that they use Japanese text, and instert the English mark-ups when needed.
i.e.: [img]米[/img]
That's how I would think they would use it.
i.e.: [img]米[/img]
That's how I would think they would use it.
Look to the skies and you'll find the heavens.
-

Ueshu - Posts: 32
- Joined: Fri 06.23.2006 10:20 am
- Location: U.S.
RE: Japanese in html
Oops, that didn't work. ごめなさい。 Sorry.
Look to the skies and you'll find the heavens.
-

Ueshu - Posts: 32
- Joined: Fri 06.23.2006 10:20 am
- Location: U.S.
RE: Japanese in html
noisyturtle wrote:
Does anyone know how to put in Japanese when using html for a website? I have been looking but haven't figured out how to do it yet.
can you be more clear? as it is, your question doesn't make much sense.
are you asking:
1. how do i put an html page on my website with Japanese in it?
2. how do i enter Japanese text in a textbox on some random web page?
3. some other question...
-

zengargoyle - Posts: 1200
- Joined: Sun 05.29.2005 10:16 pm
RE: Japanese in html
If it's 1), then type up the document with the appropriate Japanese, save it in an encoding that is Japanese-capable (such as UTF-8), then put the encoding in the heading, like this:
- Code: Select all
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>ゆきの物語</title>
</head>
Richard VanHouten
ゆきの物語
ゆきの物語
- richvh
- Posts: 6407
- Joined: Thu 09.29.2005 10:35 pm
RE: Japanese in html
even 1) doesn't necessarily hold.... if you're using CGI scripts of various sorts (PHP/Perl/etc) to generate your pages, or if your web server is not configured to parse the meta-tags within the output.
the character set of a response, if set in the HTTP headers, overrides any declaration in the response data itself. if your server is not setup to parse the files before sending the HTTP headers then the meta-tag trick will not work. you'll have to either configure the server to parse the file for meta-tags, or use another method to set the appropriate Content-Type HTTP header. also, sometimes, the Content-Type meta tag must be the very first tag in the <head> section or it will not work.
with PHP and Apache on Linux, you need to take into account PHP's default charset, and Apache's configuration.... I've had to use the .htaccess file to override the charset:
<Files "heisig.html">
AddCharset UTF-8 .html
</Files>
for a single file, or for a whole directory:
AddDefaultCharset utf-8
so it all really depends on which web server you are using, which CGI scripting language you are using, and the configuration of each (web/cgi) as to what is default, and whether or not the output is scanned for the meta tags in the head section.... the sad truth is that sometimes the meta tag solution just doesn't work.
the character set of a response, if set in the HTTP headers, overrides any declaration in the response data itself. if your server is not setup to parse the files before sending the HTTP headers then the meta-tag trick will not work. you'll have to either configure the server to parse the file for meta-tags, or use another method to set the appropriate Content-Type HTTP header. also, sometimes, the Content-Type meta tag must be the very first tag in the <head> section or it will not work.
with PHP and Apache on Linux, you need to take into account PHP's default charset, and Apache's configuration.... I've had to use the .htaccess file to override the charset:
<Files "heisig.html">
AddCharset UTF-8 .html
</Files>
for a single file, or for a whole directory:
AddDefaultCharset utf-8
so it all really depends on which web server you are using, which CGI scripting language you are using, and the configuration of each (web/cgi) as to what is default, and whether or not the output is scanned for the meta tags in the head section.... the sad truth is that sometimes the meta tag solution just doesn't work.
-

zengargoyle - Posts: 1200
- Joined: Sun 05.29.2005 10:16 pm
RE: Japanese in html
But the good news is any respectable web hosting company will have their servers set up to allow any language, so just adding the tags like Rich showed should work fine.
Don't let Zen confuse or depress you!
Don't let Zen confuse or depress you!
-

keatonatron - Posts: 4838
- Joined: Sat 02.04.2006 3:31 am
- Location: Tokyo (Via Seattle)
- Native language: English
- Gender: Male
RE: Japanese in html
hehe, respectable... you're just as likely that your hosting company has set everything up to default to 'latin-1' or some such and have a hell of a time getting anything non-ASCII to display at all.... and/or they have 'AllowOverride None' in the configs so that your .htaccess files don't work at all.
but yes, if you are not unlucky, Rich's answer will work
or you can always use HTML entities like 〹 to insert any Unicode character you like into your page... (but this doesn't always work for the #2 question since some sites filter out HTML entities).
but yes, if you are not unlucky, Rich's answer will work
or you can always use HTML entities like 〹 to insert any Unicode character you like into your page... (but this doesn't always work for the #2 question since some sites filter out HTML entities).
-

zengargoyle - Posts: 1200
- Joined: Sun 05.29.2005 10:16 pm
RE: Japanese in html
richvh wrote:
If it's 1), then type up the document with the appropriate Japanese, save it in an encoding that is Japanese-capable (such as UTF-8), then put the encoding in the heading, like this:
- Code: Select all
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>ゆきの物語</title>
</head>
Thanks that worked. Sorry I wasn't clearer but I wanted to put Japanese text on a webpage I am making with html.
- noisyturtle
- Posts: 20
- Joined: Thu 01.11.2007 1:46 am
RE: Japanese in html
Just like you put English. Only put Japanese instead of English text...... thats all.
Who ever have things installed to see Japanese text, will see it on your page.
Who ever have things installed to see Japanese text, will see it on your page.
Last edited by Kdar on Mon 02.19.2007 2:24 pm, edited 1 time in total.
-

Kdar - Posts: 278
- Joined: Fri 01.12.2007 5:37 pm
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests







Click to sign up
