Skip to content

Commit 76c87a9

Browse files
committed
FIX: invalid ENHEX edge result
related to: metaeducation/rebol-issues#1986
1 parent 1bc566f commit 76c87a9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/core/n-strings.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ static struct digest {
676676
REBUNI c = up[0];
677677
up++;
678678

679-
if (c > 0x80) {// all non-ASCII characters *must* be percent encoded
679+
if (c >= 0x80) {// all non-ASCII characters *must* be percent encoded
680680
encoded_size = Encode_UTF8_Char(encoded, c);
681681
goto char_needs_encoding;
682682
} else {

src/tests/units/series-test.r3

+1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ Rebol [
261261
--assert "%22%25-.%3C%3E%5C%1F%60%7B%7C%7D~" = enhex {"%-.<>\^_`{|}~}
262262
; --assert %%C5%A1ik = enhex %šik ;<-- this does not work yet!
263263
--assert "šik" = to-string dehex enhex to-binary "šik"
264+
--assert "%C2%80" = enhex to-string #{80}
264265

265266

266267
===end-group===

0 commit comments

Comments
 (0)