diff options
Diffstat (limited to 'appl')
| -rw-r--r-- | appl/lib/styx.b | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/appl/lib/styx.b b/appl/lib/styx.b index c862c9a1..64549c02 100644 --- a/appl/lib/styx.b +++ b/appl/lib/styx.b @@ -69,13 +69,16 @@ init() utflen(s: string): int { - # the domain is 16-bit unicode only, which is all that Inferno now implements + # the domain is 21-bit unicode n := l := len s; for(i:=0; i<l; i++) if((c := s[i]) > 16r7F){ n++; - if(c > 16r7FF) + if(c > 16r7FF){ n++; + if(c > 16rFFFF) + n++; + } } return n; } |
