public inbox for rhug-rhats@sourceware.org
 help / color / mirror / Atom feed
* Re: property files and character encodings
@ 2001-09-10 20:03 Anthony Green
  2001-09-10 20:15 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Green @ 2001-09-10 20:03 UTC (permalink / raw)
  To: tromey; +Cc: java, rhug-rhats

I came up with a patch of my own.  Can I just check this in?


2001-09-10  Anthony Green  <green@redhat.com>

	* java/util/Properties.java: Increment index while parsing \u
	sequence.

Index: libjava/java/util/Properties.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/Properties.java,v
retrieving revision 1.9
diff -c -u -r1.9 Properties.java
--- Properties.java	2001/09/06 17:16:09	1.9
+++ Properties.java	2001/09/11 02:56:03
@@ -185,6 +185,7 @@
 			    char uni = (char) Integer.parseInt
 			      (line.substring(pos, pos + 4), 16);
 			    key.append(uni);
+			    pos += 4;
 			  }	// else throw exception?
 			break;
 		      default:

AG

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: property files and character encodings
  2001-09-10 20:03 property files and character encodings Anthony Green
@ 2001-09-10 20:15 ` Tom Tromey
  2001-09-10 21:55   ` Anthony Green
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2001-09-10 20:15 UTC (permalink / raw)
  To: Anthony Green; +Cc: java, rhug-rhats

>>>>> "Anthony" == Anthony Green <green@cygnus.com> writes:

Anthony> I came up with a patch of my own.  Can I just check this in?
Anthony> 2001-09-10  Anthony Green  <green@redhat.com>
Anthony> 	* java/util/Properties.java: Increment index while parsing \u
Anthony> 	sequence.

I just checked in my patch, which is a superset of this one.
There's another case lower down with the same problem.

Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: property files and character encodings
  2001-09-10 20:15 ` Tom Tromey
@ 2001-09-10 21:55   ` Anthony Green
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony Green @ 2001-09-10 21:55 UTC (permalink / raw)
  To: tromey; +Cc: java, rhug-rhats

Tom wrote:
> I just checked in my patch, which is a superset of this one.
> There's another case lower down with the same problem.

Great!  Thanks!

With this change I am able to perform xsl translations with Xalan. I've
compiled org.apache.xalan.xslt.Process into a program, xsltp, which reads XML
and XSL files to generate appropriate output (like HTML).

xsltc is another program which compiles XSL files into .class files which may
be compiled with gcj and linked with the Xalan runtime to perform similar
translations.

Xalan is huge - so the fact that we can build and run it is an important
milestone in gcj's development.

Thanks!

AG


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: property files and character encodings
  2001-09-09 22:09 Anthony Green
@ 2001-09-10 19:27 ` Tom Tromey
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2001-09-10 19:27 UTC (permalink / raw)
  To: green; +Cc: java, rhug-rhats

>>>>> "Anthony" == Anthony Green <green@redhat.com> writes:

Anthony> {http\u003a//xml.apache.org/xslt}indent-amount=0
Anthony> Note the escape sequence for `:'.

Anthony> The program then tries to search this resource bundle for
Anthony> "{ http://xml.apache.org/xslt}content-handler" ; and doesn't
Anthony> find a match.  The problem is that \u003a isn't being
Anthony> converted into `:' when read from a property file.  I don't
Anthony> know what the right solution is.  Advice welcome...

This is a bug in java.util.Properties.load().  I'm testing a fix.
I'll check it in if it passes my tests.

Thanks,
Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* property files and character encodings
@ 2001-09-09 22:09 Anthony Green
  2001-09-10 19:27 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Green @ 2001-09-09 22:09 UTC (permalink / raw)
  To: java; +Cc: rhug-rhats

I just figured out why the xalan xsl transformer isn't running.  It's
reading property files (either compiled in, or from disk) which
contain text like this...

# Note that the colon after the protocol needs to be escaped.
{http\u003a//xml.apache.org/xslt}indent-amount=0
{http\u003a//xml.apache.org/xslt}content-handler=org.apache.xalan.serialize.SerializerToHTML
{http\u003a//xml.apache.org/xslt}entities=HTMLEntities.res
{http\u003a//xml.apache.org/xslt}use-url-escaping=yes
{http\u003a//xml.apache.org/xslt}omit-meta-tag=no


Note the escape sequence for `:'.

The program then tries to search this resource bundle for
"{ http://xml.apache.org/xslt}content-handler" ; and doesn't find a
match.  The problem is that \u003a isn't being converted into `:' when
read from a property file.  I don't know what the right solution is.
Advice welcome...

Thanks,

AG

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-09-10 21:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-10 20:03 property files and character encodings Anthony Green
2001-09-10 20:15 ` Tom Tromey
2001-09-10 21:55   ` Anthony Green
  -- strict thread matches above, loose matches on Subject: below --
2001-09-09 22:09 Anthony Green
2001-09-10 19:27 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).