Door Games Unlimited

Welcome, Guest.


Subject: UTF-8 and console.strlen() Date: Sun Sep 07 2025 14:04:59
From: Nightfox To: Digital Man

Hi DM,

I've updated with the change you made for con_out.cpp.  That helps, as things lo
ok good with that.  After that though, I got another spam email and I see anothe
r case where console.strlen() is reporting more characters than what are display
ed.  The string has an "E" at the end.. The string that gets displayed on a non-
UTF8 terminal is ¿¿¿¿¿¿¿¿E, which is 9 characters, but console.strlen() returns 
10.

I've made some example JavaScript code available here (I couldn't paste the stri
ng, even when using a UTF-8 terminal):

http://www.digitaldistortionbbs.com:81/synchronet_stuff/UTF8_strlen.js

My web browser isn't displaying the string properly, but I've found that it look
s okay if I download it via wget.

I've also commented on the merge request I made yesterday which is now closed.

Nightfox

---
 ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

Previous Message       Next Message