Bug 30593 - no JavaSrc encoders
Summary: no JavaSrc encoders
Status: NEW
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2007-01-26 00:57 UTC by Tom Tromey
Modified: 2007-12-25 01:39 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2007-01-26 01:59:47


Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2007-01-26 00:57:05 UTC
It would be handy to have "JavaSrc" encoders.  This would let us remove
jv-convert from gcj.  Also it would make native2ascii a bit less ugly.
Comment 1 Tom Tromey 2007-01-26 01:59:47 UTC
Mark asked on irc so I thought I would expand.

A JavaSrc encoder applies a transform mentioned in the JLS.
It turns non-ascii characters into the sequence \uNNNN.
If it sees a literal \uNNNN in the input stream, this is turned
into \\uNNNN.  (And likewise for any number of \s)

The decoder goes the other way, turning \uNNNN into a unicode
character and stripping a \ from other forms.

IOW it is an encoder that handles what native2ascii is currently
doing in plain old code.
Comment 2 Andrew John Hughes 2007-12-25 01:39:34 UTC
Tom, how do you see this being implemented? As a character set encoder?