users@jaxb.java.net

Re: getting rid of ^M characters in XJC generated .java files

From: Mark D. Hansen <khookguy_at_yahoo.com>
Date: Thu, 24 Jul 2003 11:39:36 -0400

Thanks - that is what I get for using emacs with Windows! There must be
a way to configure it to display the Windows system line.separator
("\r\n") properly.

> -----Original Message-----
> From: Discussion list for the Java Architecture for XML Binding
> [mailto:JAXB-INTEREST_at_JAVA.SUN.COM]On Behalf Of Ryan Shoemaker -
> JavaSoft East
> Sent: Thursday, July 24, 2003 11:23 AM
> To: JAXB-INTEREST_at_JAVA.SUN.COM
> Subject: Re: getting rid of ^M characters in XJC generated .java files
>
>
> Mark D. Hansen wrote:
>
> > Sorry if this is a dumb question, but how do I prevent XJC
> from using ^M for newline so that
> > my JAXB generated .java files look better in Windows?
> >
>
> Our code generator is using PrintWriter which always uses the
> system line.separator
> property ("\r\n" on Windows). The only editor on my Windows
> system that displayed
> the CR as a ^M was XEmacs.
>
> We did find a small problem with the way that we produce the
> file prolog comments
> ( "// This file was generated by..." ), but it's now fixed.
> We were explicitly
> printing a '\n' which is handled differently by some editors
> ( notepad -vs- wordpad
> for example).
>
> --Ryan
>
> > Thanks,
> >
> > Mark
> >
> >
>