[ 
https://issues.apache.org/jira/browse/CONFIGURATION-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Bourg updated CONFIGURATION-41:
----------------------------------------

    Fix Version/s: 1.2

> [configuration] Output format of FileConfiguration classes
> ----------------------------------------------------------
>
>                 Key: CONFIGURATION-41
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-41
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.1
>         Environment: Operating System: Windows 2000
> Platform: Other
>            Reporter: Kay Doebl
>             Fix For: 1.2
>
>         Attachments: properties_lineseparator.patch, XML_encoding.patch
>
>
> I am using Commons Configuration 1.1.
> Saving 'FielConfiguration's the configuration files will be overwritten every 
> time.
> Bad if you have formatted them with descriptions and comments ... but this is
> not so important.
> Not so good is, that in the class:
> PropertiesConfiguration:
> '\n' is used as "line separator" and not the 
> "System.getProperty("line.separator")".
> So, on Windows systems the configuration files are badly readable.
> XMLConfiguration:
> The encoding is not looped though to the encoding in the XML head declaration.
> Every time "UTF-8" is set (<?xml version="1.0" encoding="UTF-8"?>)
> I would prefer that my encoding (setEncoding()) is reflected in the XML 
> document.
> Is there a reason that it is implemented like you do?
> Attached are patches which would resolve the problems (if you want):
> PropertiesConfiguration.java:
> properties_lineseparator.patch
> 136a137,138
> >     private static final String lineSeparator =
> System.getProperty("line.separator");
> > 
> 344c346
> <                 out.write("\n");
> ---
> >                 out.write(lineSeparator);
> 349c351
> <             out.write("\n");
> ---
> >             out.write(lineSeparator);
> 486c488
> <             write('\n');
> ---
> >             write(lineSeparator);
> 511c513
> <             write("# " + comment + "\n");
> ---
> >             write("# " + comment + lineSeparator);
> XMLConfiguration.java:
> XML_encoding.patch
> 446a447
> >             transformer.setOutputProperty(OutputKeys.ENCODING, 
> > getEncoding());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to