Solved

Display Japanese Characters in HTML

Posted on 2006-07-18
8
140 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:PvBredow
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…

763 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

12 Experts available now in Live!

Get 1:1 Help Now