Skip to content

Commit d4f2f79

Browse files
committed
Merge branch 'patch-1' of github.com:Atry/phpjs into Atry-patch-1
Conflicts: functions/xml/utf8_encode.js
2 parents f82059b + 53fd767 commit d4f2f79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

functions/xml/utf8_encode.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ function utf8_encode(argString) {
3434
enc = String.fromCharCode(
3535
(c1 >> 6) | 192, (c1 & 63) | 128
3636
);
37-
} else if (c1 & 0xF800 != 0xD800) {
37+
} else if ((c1 & 0xF800) != 0xD800) {
3838
enc = String.fromCharCode(
3939
(c1 >> 12) | 224, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128
4040
);
4141
} else { // surrogate pairs
42-
if (c1 & 0xFC00 != 0xD800) {
42+
if ((c1 & 0xFC00) != 0xD800) {
4343
throw new RangeError('Unmatched trail surrogate at ' + n);
4444
}
4545
var c2 = string.charCodeAt(++n);
46-
if (c2 & 0xFC00 != 0xDC00) {
46+
if ((c2 & 0xFC00) != 0xDC00) {
4747
throw new RangeError('Unmatched lead surrogate at ' + (n - 1));
4848
}
4949
c1 = ((c1 & 0x3FF) << 10) + (c2 & 0x3FF) + 0x10000;
@@ -65,4 +65,4 @@ function utf8_encode(argString) {
6565
}
6666

6767
return utftext;
68-
}
68+
}

0 commit comments

Comments
 (0)