Donate Share

[ini4j]

Tracker: Bugs

5 handling backslashes in ini file values - ID: 1979416
Last Update: Comment added ( szkiba )

1.) if there is a backslash in a value it's not given back from the Ini
instance:

byte[] b = "[whatever]\nread=foo\\bar".getBytes();
Ini ini = new Ini(new ByteArrayInputStream(b));
Section s = ini.get("whatever");
s.get("read"); // returns 'foobar' instead of 'foo/bar'

2.) haven't found a way how to store only one backslash from an Ini
instance

...
Section s = ini.get("whatever");
s.put("write", "foo\\bar");
ByteArrayOutputStream os = new ByteArrayOutputStream();
ini.store(os);
os.toString(); // returns '\\'


regards


Nobody/Anonymous ( nobody ) - 2008-05-30 15:32

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comments ( 3 )

Date: 2009-02-17 15:45
Sender: szkibaProject Admin

Fixed in version 0.4.0

You can disable escape handling either global level
Config.getGlobal().setEscape(false)
or set org.ini4j.config.escape system property to false

or you can pass Config object to Ini (setConfig)

Please let me known is it help or not in Netbeans. I never known officialy
that netbens use ini4j :)



Date: 2008-11-12 15:14
Sender: chazware

This is an issue that causes a problem in NetBeans. See:
http://www.netbeans.org/issues/show_bug.cgi?id=131440

Please fix this.


Date: 2008-11-12 15:11
Sender: chazware

This is an issue that causes a problem in NetBeans. See:
http://www.netbeans.org/issues/show_bug.cgi?id=131440

Please fix this.


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2009-02-17 15:45 szkiba
resolution_id None 2009-02-17 15:45 szkiba
allow_comments 1 2009-02-17 15:45 szkiba
close_date - 2009-02-17 15:45 szkiba