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)
|