Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Display Japanese Characters in HTML

Posted on 2006-07-18
8
Medium Priority
?
150 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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 1500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…

972 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