Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

v1.1.2

  • Loading branch information...
commit 4fe0c51c6bed304b5365834458597e8b6ba3d8bc 1 parent c7b7d81
@gagle authored
View
4 CHANGES
@@ -1,3 +1,7 @@
+v1.1.2 (22 Oct 2013)
+ Bugfix stringifying characters when "unicode" was true (improved ISO 8859-1
+ compatibility).
+
v1.1.1 (14 Oct 2013)
Bugfix when "parse()" was called with only 1 parameter.
View
2  README.md
@@ -5,7 +5,7 @@ _Node.js project_
#### .properties parser/stringifier ####
-Version: 1.1.1
+Version: 1.1.2
[Specification](http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29)
View
5 lib/escape.js
@@ -39,6 +39,9 @@ module.exports = function (c, code, meta, options){
//Control sets 0 and 1
if (code < 160) return unicode (code);
- //ASCII extended and multibyte characters
+ //Printable 8-bit character
+ if (code < 256) return c;
+
+ //Multibyte character
return options.unicode ? unicode (code) : c;
};
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "properties",
- "version": "1.1.1",
+ "version": "1.1.2",
"description": ".properties parser/stringifier",
"keywords": ["properties", "ini", "parser", "stringifier", "config"],
"author": "Gabriel Llamas <gagle@outlook.com>",
View
6 test/stringify.js
@@ -8,6 +8,12 @@ var WIN = process.platform === "win32";
var EOL = WIN ? "\r\n" : "\n";
var tests = {
+ "iso-8859-1": function (){
+ var options = { unicode: true };
+ var data = properties.stringify ({ "¡": "ÿ", "Ā": "a" }, options);
+ var expected = "¡ = ÿ" + EOL + "\\u0100 = a";
+ assert.strictEqual (data, expected);
+ },
"comments multiline": function (){
var stringifier = properties.createStringifier ().header ("a\nb\r\nc\n");
var data = properties.stringify (stringifier);
Please sign in to comment.
Something went wrong with that request. Please try again.