-
-
Notifications
You must be signed in to change notification settings - Fork 172
Minor country and help fixes #3186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Oh man... don't tell me this is still an unsolved problem in the C++ std lib... Like every lowly scripting language had this for 20 years now...😞 |
Unfortunately, it is.
I could implement UTF-8 compliant IMHO better ask the translator to do the job. |
3718244
to
ca429d4
Compare
@FeralChild64 Actually, I take my statement back that "every other stdlib" can do this 😅 I'm pretty sure most other languages offer the same basic support only, i.e., they only count "code points", or "runes" (they're called runes in Nim, for instance). But not that wacky situation you described. Also some libs just shit themselves when dealing with 4-byte UTF-8 emojis which are super popular among Asian audiences (talking from real world experience here; 4-byte UTF-8 emojis caused so many headaches for me in the past...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tha is for the thorough discussion and explanation, @FeralChild64 !
Makes sense.
Reading about it, ICU has a break iterator, but people mention how its API is very old. Boost's locale.hpp has a boundary iterator that can be used to count graphemes. Glib has a UTF-8 So ICU and Boost would be heavy dependencies, so having your engine handle this in the future would be very nice, @FeralChild64 ! |
Yeah, I don't even want to go near Boost. Like ever, unless I'm extremely well compensated 😄 |
Description
strlen
or C++ counterparts (they give us length in bytes, and a single Unicode character might need many bytes to be encoded); it is much easier to rely on the translator to put a proper number of minuses (as a title underscore).Manual testing
Execute
dosbox --list-countries
anddosbox --list-glshaders
commandsChecklist
I have: