Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 153
  • Last Modified:

Display Japanese Characters in HTML

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
PvBredow
Asked:
PvBredow
  • 4
  • 4
1 Solution
 
slyongCommented:
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
 
slyongCommented:
sorry <b>&#26481;&#20140;&#26032;&#32862;</b> is supposed to be in Japanese but when uploaded to EE, it is translated into # code.
0
 
PvBredowAuthor Commented:
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
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
PvBredowAuthor Commented:
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
 
PvBredowAuthor Commented:
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
 
slyongCommented:
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
 
slyongCommented:
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
 
PvBredowAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now