From 76c87a9651a0c82b894f4e02d07718a272d61b7f Mon Sep 17 00:00:00 2001 From: Oldes Date: Thu, 6 Jun 2019 17:41:00 +0200 Subject: [PATCH] FIX: invalid ENHEX edge result related to: https://github.com/rebol/rebol-issues/issues/1986 --- src/core/n-strings.c | 2 +- src/tests/units/series-test.r3 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/n-strings.c b/src/core/n-strings.c index 82805ba775..8f44b510eb 100644 --- a/src/core/n-strings.c +++ b/src/core/n-strings.c @@ -676,7 +676,7 @@ static struct digest { REBUNI c = up[0]; up++; - if (c > 0x80) {// all non-ASCII characters *must* be percent encoded + if (c >= 0x80) {// all non-ASCII characters *must* be percent encoded encoded_size = Encode_UTF8_Char(encoded, c); goto char_needs_encoding; } else { diff --git a/src/tests/units/series-test.r3 b/src/tests/units/series-test.r3 index 27467c98aa..a4c97fac45 100644 --- a/src/tests/units/series-test.r3 +++ b/src/tests/units/series-test.r3 @@ -261,6 +261,7 @@ Rebol [ --assert "%22%25-.%3C%3E%5C%1F%60%7B%7C%7D~" = enhex {"%-.<>\^_`{|}~} ; --assert %%C5%A1ik = enhex %šik ;<-- this does not work yet! --assert "šik" = to-string dehex enhex to-binary "šik" + --assert "%C2%80" = enhex to-string #{80} ===end-group===