Re: [Tuxpaint-devel] Is this warning harmless?
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Bill K. <nb...@so...> - 2021-11-04 05:21:08
|
On Wed, Nov 03, 2021 at 09:53:01PM -0700, Bill Kendrick wrote: <snip> > Back to the issue at hand, it actually seems like anything about I mean "above" not "about". :) > 0xFFFF isn't really useful to us. > > https://unicodebook.readthedocs.io/unicode.html#unicode-categories > > says: > > There are 3 ranges reserved for private use (Co subcategory): > U+E000 - U+F8FF (6,400 code points), U+F0000 - U+FFFFD (65,534) and > U+100000 - U+10FFFD (65,534). Surrogates (Cs subcategory) use the > range U+D800 - U+DFFF (2,048 code points). Ah shoot, I misread. So it seems like U+10000 through U+0FFFFF are NOT private use. I missed that other zero. :) (The highest code-point is U+10FFFF.) Things in this high range are non-BMP characters (BMP = Basic Multilingual Plane). Up there we have things like Emojis, for example U+1F602, "Face with tears of joy". I've actually been thinking about how and if Emojis could be used with Tux Paint's text tool. It seems like it will be impossible, for now at least, with 16-bit wchar systems like Windows. Opening a ticket for us to sort this out some day... https://sourceforge.net/p/tuxpaint/feature-requests/210/ -bill! > > I'm thinking it's probably safe to just ignore str[] values above > 0xFFFF (which are impossible on environments, like Windows, with > 16-bit `wchar`). > > I'll see what happens on Linux. If it seems okay, I'll commit, and > you can test things on Windows. > > > Regarding those characters that did not appear in the OSK for you, > I made the above discover by simply replacing the code that converts > any >= 0x00010000 values in str[] to UTF-8, for sending to SDL_Pango, > and just doing this: > > utfstr[j++] = 'X'; > > ...But I could still see the symbols (and not an "X"). :) > > Perhaps that's a font issue? Can you play around with it? > > > -bill! > > > > > > I'm digging around the code right now. > > > > -bill! > > > > > > > > > > > > > TOYAMA Shin-ichi wrote in <617e94b2.5007%sh...@wm...> > > > >Hi, > > > > > > > >Recently, I've been dealing with a lot of bugs in the Windows > > > >version, and I've noticed that many clue of the bugs had been > > > >appeared in the compile-time warnings. > > > > > > > >So,I checked the warnings again, and the following warning, > > > >which does not appear when compiling on Linux, caught my > > > >attention. > > > > > > > >------------------------------------------------------------ > > > >src/tuxpaint.c: In function 'render_text_w': > > > >src/tuxpaint.c:1685:27: warning: comparison is always true due to limited range > > > >of data type [-Wtype-limits] > > > > 1685 | else if (str[i] <= 0x0000FFFF) > > > >------------------------------------------------------------ > > > > > > > >If this warning is correct, it means that the next conditional > > > >branch (0x00100000 - 001FFFFF) will never be reached. > > > > > > > >How can I confirm if it were a problem or not? > > > > > > > >Thanks! > > > > > > -- > > > TOYAMA Shin-ichi mailto:sh...@wm... > > > > > > > > > _______________________________________________ > > > Tuxpaint-devel mailing list > > > Tux...@li... > > > https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel > > > > > > -- > > -bill! > > Sent from my computer > > > > > > _______________________________________________ > > Tuxpaint-devel mailing list > > Tux...@li... > > https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel > > -- > -bill! > Sent from my computer > > > _______________________________________________ > Tuxpaint-devel mailing list > Tux...@li... > https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel -- -bill! Sent from my computer |