2 Commits

Author SHA1 Message Date
Piotr Wolny
3d7aa9ee7c New version. 2014-05-20 11:20:34 +02:00
Piotr Wolny
a19a30490d Do not touch escape sequences other than unicode escepe sequeneces ('\uXXXX'). 2014-05-20 11:19:44 +02:00
2 changed files with 5 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SimplePropertiesEditor
Bundle-SymbolicName: SimplePropertiesEditor; singleton:=true
Bundle-Version: 1.0.3
Bundle-Version: 1.0.4
Bundle-Activator: org.gildur.simplepropertieseditor.Activator
Bundle-Vendor: Piotr Wolny
Require-Bundle: org.eclipse.core.runtime,

View File

@@ -46,13 +46,10 @@ public class PropertiesDocumentProvider extends FileDocumentProvider {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < content.length(); i++) {
char c = content.charAt(i);
if (c == '\\') {
c = content.charAt(i + 1);
if (c == 'u') {
int code = Integer.parseInt(content.substring(i + 2, i + 6), 16);
buffer.append((char) code);
i += 5;
}
if (c == '\\' && i < content.length() - 1 && content.charAt(i + 1) == 'u') {
int code = Integer.parseInt(content.substring(i + 2, i + 6), 16);
buffer.append((char) code);
i += 5;
} else {
buffer.append(c);
}