TIP: Click on subject to list as thread! ANSI
echo: sync_programming
to: GitLab note in main/sbbs
from: Rob Swindell
date: 2024-06-27 13:46:00
subject: dd_lightbar_menu: str_is_

https://gitlab.synchro.net/main/sbbs/-/merge_requests/440#note_5382

All ASCII characters (and thus, ASCII strings) are also valid UTF-8 characters/strings.

So... I'm not clear on what you mean by "sometimes"? If there's, say, a CP437 character in a string, then  *that* string would not be a valid UTF-8 string, but all purely ASCII strings are valid UTF-8 strings.

The JSDOC for this function says "Return true if the specified string contains only valid UTF-8 encoded and US-ASCII characters" - so I'm not clear if/how this function isn't behaving as expected or you just didn't read the "US-ASCII" part?
--- SBBSecho 3.20-Linux
                                                                        
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.