Solved

Display Japanese Characters in HTML

Posted on 2006-07-18
8
141 Views
Last Modified: 2010-04-09
I have a page (in English) that contains references to files.      I have just been given some files in Japanese, and I thought (quite stupidly) that it shouldn't be that hard to provide Japanese language descriptions of these files.
That stupid thought was many hours & websites ago.       I have seen lots of confusing material on the web about language encoding.

I have been sent Japanese language descriptions (which seem to display properly on my computer.     I have cut & pasted them into HTML, and when I display the source of the page, it is fine, but when displayed inside my browser, I just see non-displayable characters.

I have no idea what encoding was used to prepare the descriptions I was sent, and they came from someone with no technical knowledge, so asking the author would be pointless.

My question:
     must I translate the characters into some encoded string?    if so, is there a translation tool (similar to Babelfish) that will translate from Japanese characters into encoded data?
     is it possible to simply cut & paste the characters in my html page, and then add a code to indicate what language they are in?       if that is possible, can you please provide the actual syntax?      I have seen references to this idea, but haven't actually seen the complete syntax, so I haven't been able to make use of this approach.

             regards,
                            PvBredow
0
Comment
Question by:PvBredow
  • 4
  • 4
8 Comments
 
LVL 24

Expert Comment

by:slyong
ID: 17135686
hmm.. try doing this:

<html>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<head>
<title>Tokyo News</title>
</head>
<body>
<b>&#26481;&#20140;&#26032;&#32862;</b>
</body>
</html>

adding the charset might just what you need.
0
 
LVL 24

Expert Comment

by:slyong
ID: 17135689
sorry <b>&#26481;&#20140;&#26032;&#32862;</b> is supposed to be in Japanese but when uploaded to EE, it is translated into # code.
0
 

Author Comment

by:PvBredow
ID: 17135787
Slyong,
 You are clearly on the right track, but when you wrote:
<b>&#26481;&#20140;&#26032;&#32862;</b>

HOW DID YOU KNOW?

If I have a string of Japanese characters, how can I translate them into the equivalent numbers, as you have done above?

&#22806;&#22269;&#28858;&#26367;  -->   ? ? ? ?

I can use a site like Babelfish to translate the words into English words, but to get the numeric encoding as you used above, how can I do that?

               thanks,  
                             PvBredow
0
 

Author Comment

by:PvBredow
ID: 17136129
To my great surprise, when I pasted the Japanese characters into this page, the result was shown as the numeric encoding.     So it seems that anything I want encoded I can simply send to this site.    
www.experts-exchange.com     is full of useful features!

Hopefully no one will mind if I send everything I need to encode to this site?      I won't need a reply.
Seriously though, I will still need to find a method to do this encoding, although it was very amusing that the site does the translation for me.

          PvBredow
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:PvBredow
ID: 17136246
I found the answer to my question.      The site:
http://www.yellowpipe.com/yis/tools/encrypter/index.php

allows for conversion of strings from lots of different formats to lots of other formats.

Since I have a small amount to translate, it is a workable solution for that moment.
Still, the points for this question are still available to anyone that can provide an equivalent approach that can be implemented programmatically.       My preference would be for VBA for conversion.
0
 
LVL 24

Expert Comment

by:slyong
ID: 17136327
Actually most Web editor that support Unicode will be able to do that translation.  What I did want to download NVU (a free web editor) from http://www.nvu.com/.  Cut and paste some Japanese text into it, save it and open it up with Notepad on Windows, I get all the translated hex code.
0
 
LVL 24

Accepted Solution

by:
slyong earned 500 total points
ID: 17136331
But I think if you use NVU as your HTML editor, you can simple create those pages and upload it to your Web site without any problem :D
0
 

Author Comment

by:PvBredow
ID: 17840275
Slyong,
         Thanks for your help.      In the end, I would say I stumbled onto a solution myself, but since you were the only one who tried to help me, I will award you the points.      Thanks for trying to help me.

           PvBredow
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
spacing 5 57
convert publisher file to an outlook email template 8 40
Show banners that are blocked by Ad Muncher 10 48
html5 auto send email 7 22
Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now