Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Netscape Javascript Problem




As it happens I'm looking into a similar problem now (I've investigated on
IE5 at the moment).  I've found that the browsers will not properly
recognize double-byte sequences if they are programmatically generated, but
will properly handle double-byte string literals which have not been
massaged.  So for example, supposing I have a target (say a layer), in
variable "L".  Doing:

	L.innerHTML = "<double-byte-string>";

works.  Generating that string programatically, as in:

	Dstring += "<double-byte-char-string>";
	...
	Dstring += "<double-byte-char-string>";
	L.innerHTML = Dstring;

does not work.  Rather one gets a sequence of single byte symbols from the
latin-1 extended character set.  I'm trying to find a workaround - will let
you know if I come up with anything (assuming your problem is related).

It's my guess that the "decision" as to whether a given string represents a
double-byte sequence is made in two places:

   - while loading a URI (or post load)
   - while pre-parsing javascript

As far as I can tell there does not seem to be any logic (or it is broken)
during the execution phase.

JS


> -----Original Message-----
> From: Ulrike Schmidt [mailto:ulrike@example.com]
> Sent: Monday, October 09, 2000 6:58 PM
> To: tlug@example.com
> Subject: Netscape Javascript Problem
>
>
> Thre is a problem with Simon's annotate script: the window does
> not properly
> display Japanese, there are only questionsmarks were the Japanese
> should be
> when the Character set is set to Japanese.
>
> >            print <<EOF
> >    <A HREF="javascript:" onMouseOver='
> >        mywin = window.open("","","width=200,height=200");
> >
> mywin.document.write("$cset<B>Word</B>:$kanji<P><B>Root</B>:$deinf
> lected<P><
> B>Reading</B>: $yomi<P><B>Part of Speech</B>: $pos");
> >        mywin.document.close();
> >    '
> >    onMouseOut='mywin.window.close(); return true;'>
> >$kanji</A>
> >EOF
>
> My current suspicion is that the document.write function does not write
> Japanese properly. Is this right, and is there a solution?
>
> Uli
>
>
> -----------------------------------------------------------------------
> Next Nomikai Meeting: October 20 (Fri) 19:00   Place: Tengu TokyoEkiMae
> Next Technical Meeting: November 11 (Sat) 13:30  Place: LinuxProbe Hall
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan
>
>


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links