Complete
over 5 years ago

Expected.

Hebrew presented as question marks in simulator

I have created a Hebrew resources file in UTF-8 and entered Hebrew characters.  I know that the encoding is correct since I use System.println() the exact string that it is about to print out.  This comes out like this:

However when it comes up on the simulator with encoding Hebrew it looks like this:

Is there a bug with the simulator or am I doing something wrong?

Former Member
Former Member
  • is there any chance you can edit your big post and fix the links (all are 404)

  • All that said, as far as I can tell, the system is functioning exactly as expected, so this is not a bug.

  • Based on the screen captures provided above, it looks like you're trying to display ש (U+05E9 Hebrew Letter Shin) on a fenix6xpro with Graphics.FONT_XTINY.

    The issue is that each font on a device has glyphs for a subset of the of the possible UTF8 code points. For the device/font combination in question, only the following code points are available:

    U+0020 - U+007E
    U+00A0 - U+0107
    U+010C - U+0113
    U+0116 - U+011B
    U+011E - U+011F
    U+0122 - U+0123
    U+012A - U+012B
    U+012E - U+0131
    U+0136 - U+0137
    U+0139 - U+013E
    U+0141 - U+0148
    U+0150 - U+0155
    U+0158 - U+015B
    U+015E - U+0165
    U+016A - U+016B
    U+016E - U+0173
    U+0178 - U+017E
    U+0192
    U+0218 - U+021B
    U+02C6 - U+02C7
    U+02D8 - U+02D9
    U+02DB - U+02DD
    U+0384 - U+0386
    U+0388 - U+038A
    U+038C
    U+038D - U+03A1
    U+0383 - U+03CE
    U+0401 - U+040C
    U+040E - U+044F
    U+0451 - U+0452
    U+045E - U+045F
    U+0490 - U+0491
    U+2013 - U+2015
    U+2018 - U+201A
    U+201C - U+201E
    U+2020 - U+2022
    U+2026
    U+2030
    U+2039 - U+2040
    U+20AC
    U+2116
    U+2122
    U+23F6 - U+23F7
    U+E0B0
    U+FFFC - U+FFFD

    I believe these are the Roman, Cyrillic, Greek, and standard diacritic glyphs. Note that the Hebrew glyphs (U+05BE - U+05F4) are not included.

    If a glyph is not available, our graphics system typically displays � (U+FFFD Replacement Character). In some cases we may display □ (U+25A1 White Square), but I'd expect this to be limited to those that are relatively old or use very old font data.

    The solution is to use your own font as described in the Resource Compiler/Fonts section of the Programmer's Guide.

    We have Devices Reference that intends to display information about the fonts for each device and font glyphs in each of those fonts. Unfortunately, this section has been hand-generated and gets out-of-date easily. It has not been updated in some time.

    I've mentioned this in other posts several times before, but I have written a documentation generator that will generate this same documentation so that it can be kept up-to-date more easily, but it has not yet been accepted and combined into the build system. I'm hoping to have some time to get it in and get the documentation updated, but it always seems like there is never enough time in the day.