473,799 Members | 2,936 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Japanese - wrong encoding in a frame

Hi,

May be it's a know issue but my search brought nothing...

We have static HTML files with Japanese text in UTF-8 encoding - it's
on-line Help for our application, so there are no Web servers involved,
just .html and .js on a hard drive.
..
Help topics are shown in a frameset (I know, I know, I personally had
no idea :)) like this (I made an example): http://RusWin.net/jindex.htm

Looks Ok in this example, each file involved has
<HEAD>
<meta http-equiv="content-type" content="text/html; charset=utf-8">

But in this example the filese used in frames are hard-coded in
jindex.htm:

<FRAMESET ROWS="14%,76%,* ">
<FRAME SRC="jheader.ht m">
<FRAMESET COLS="29%,71%">
<FRAME SRC="jleft.htm" >
<FRAME SRC="jmain.htm" NAME="page">
</FRAMESET>
<FRAME SRC="jfoot.htm" >
</FRAMESET>

In a real system main frame shows gibberish instead of Japanese -
eventhough all browsers show (if I place cursor to the main frame and
use right mouse button to see current encoding) that currently selected
encoding for that piece _is_ UTF-8, the text is shown using "Western"
encoding :(

You can see that bad effect simulated if you go to
http://RusWin.net/jindex.htm, place cursor to the main frame and using
right mouse click choose "Western(Window s)" encoding - it's what we see
in real production system!

What is the difference with my example and the real system?

In real system HTML file with FRAMESET tag has _placeholders_
(blank.htm) afrer SRC= like this:

<frame name="" src="pagenav.ht m" scrolling="no">
<frame name="" src="blank.htm" scrolling="no">
<frame name="" src="blank.htm" scrolling="auto ">
and real file names are dynamically prepared using JavaScript
(re-direct happens):

WWHGetWWHFrame( ParamToBookDir)
........
location.replac e(ParamToBookDi r +
"wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=" +
WWHBookData_Con text() + "&file=" + BaseFilename);

*************** *************** *

So does anyone know why re-direct (location.repla ce) can cause such
strange effect of a wrong encoding used?

*************** *************** ***************
We tried to avoid replacing whic removes file from frame first and
tried instead to use location to directly assign a file to the frame,
but it did not help:

newUrl = ParamToBookDir +
"wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=" +
WWHBookData_Con text() + "&file=" + BaseFilename;

location = newUrl;

*************** *************** ***************

Thanks,
Paul

Apr 21 '06
12 5805
Alan J. Flavell wrote:

Browsing local files directly in the filesystem is a kludge, and
really has little or nothing of relevance to tell us about the World
Wild Web, other than by accident.


Can you recommend to the OP a more appropriate group, suitable for
discusing non-WWW uses of HTML? It seems a little anal to treat his
question as OT, simply because he's not technically using the web.

--
Jack.
Apr 22 '06 #11
On Sat, 22 Apr 2006, Jack wrote:
Alan J. Flavell wrote:

Browsing local files directly in the filesystem is a kludge, and
really has little or nothing of relevance to tell us about the
World Wild Web, other than by accident.


Can you recommend to the OP a more appropriate group, suitable for
discusing non-WWW uses of HTML?


I can't personally predict how it would be received on alt.html, but
that's a somewhat broader church than a big-8 group which has got WWW
right there in its name.

I haven't examined the original problem in detail (neither frames nor
javascript really tempted me), but it might be that the real problem
lies with the javascript rather than with the HTML. In which case, no
HTML group would seem more on-topic than a javascript group, AFAICS.

My general advice (which indeed I follow myself, as best I can) in any
complex situation is to break a problem into its component parts and
get each one working in isolation, before fitting them together to
make a working whole. In that sense, a problem which includes both
frames and javascript seems to me to be in need of subdivision in
order to isolate the problem. If the problem hasn't already been
located while doing that, at least it would be clearer whether it was
an HTML issue, a javascript issue, or even a browser anomaly, and thus
indicate an appropriate forum for raising it. BICBW and YMMV.

regards
Apr 22 '06 #12
Thanks, Jack!

We will look further, your tests will help.
--
Regards,
Paul
Apr 22 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
9075
by: David Thomas | last post by:
Hi there, a while ago, I posted a question regarding reading japanese text from a text file. Well, since I solved the problem, I thought I'd post my solution for the benefit of other people with the same problem. The plan was to make a script to read and display japanese text. I will use it for making a japanese proverb script and for a japanese language study script.
1
3170
by: Sriv Chakravarthy | last post by:
I am trying to use xerces-c SAX parser to parse japanese characters. I have a <?xml... utf-8> line in the xml file. When the parser encounters the jap characters it throws a UTFDataFormatException. I am quite new to xml and I am not sure how to deal with this situation. Is there a way to parse the jap characters ? or should the japanese characters be escaped in the xml file (i.e. Ӓ) for this to work.
2
3356
by: Robert M. Gary | last post by:
I'm using JRE 1.5 on Solaris Japanese (Sparc). The JVM claims its default character set is EUC-JP I'm seeing two strange things when using Japanese character sets... 1) If I write a program that does System.out.println("$^%$%^^" ); //assume those are Japanese characters that are multibyte under EUC-JP The resulting output looks NOTHING like the characters I typed in. Apparently the character set being used to read the literal is...
3
2586
by: Benoit Martin | last post by:
in my windows app, I have some japanese text that I load from a text file and display on a label. No matter what type of encoding I try to use on the text file, the text always comes up as a bunch of unreadable characters on my label. Are there settings/properties for a label on a windows form to be able to read japanese text? Is it when I raed the file that it gets screwed up (I use fileOpen and LineInput)? Looking for pointers here
21
2512
by: Doug Lerner | last post by:
I'm working on a client/server app that seems to work fine in OS Firefox and Windows IE and Firefox. However, in OS X Safari, although the UI/communications themselves work fine, if the characters getting sent back and forth are in Japanese they come back from the server "moji bake" (corrupted). Anybody have any ideas why this might work differently in Safari than in Firefox or IE?
11
4773
by: prats | last post by:
I want to write a GUI application in PYTHON using QT. This application is supposed to take in Japanese characters. I am using PyQt as the wrapper for using QT from python. I am able to take input in japanese. But I am unable to display them back to GUI. It displays some junk characters Can anyone suggest me some way how to debug the issue. The code used for tranferring data from view to document is: " codec =...
3
2193
by: paulgor | last post by:
Hi, May be it's a know issue but my search brought nothing... We have static HTML files with Japanese text in UTF-8 encoding - it's on-line Help for our application, so there are no Web servers involved, just .html and .js on a hard drive. .. Help topics are shown in a frameset (I know, I know, I personally had no idea :)) like this (I made an example): http://RusWin.net/jindex.htm
2
5014
by: phl | last post by:
Hello, I have aspx(say page.aspx) page which uses javascript to submit a form reload with some unicode characters,upon an button event e.g page.aspx?param=value I get this value in the codebehind and access it via Request.Querystring property.
1
4261
by: PHP Wooer | last post by:
Can anybody there please help me out? I am having a problem with the display of Japanese character in the subject line of the mails sent in Japanese language. This problem is particularly with Hotmail Live and Yahoo Beta mails for rest all like Gmail, Hotmail original and Yahoo original its working fine. It may be some character encoding problem, but is there any way that I can get rid of this issue.
0
9686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10475
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10250
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.