Small number 9 instead of Apostrophe?

  1. 5 years ago

    Kimball L

    1 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    I'm using the Ubuntu font (available here: http://font.ubuntu.com/ ) in an app I'm building, and am seeing apostrophe characters being changed into small superscript number 9 characters.

    Like this:
    -image-

    I'm sure the first inclination will be to blame the ubuntu font, but other apps on the same machine use this font correctly (i.e., with an actual apostrophe glyph), and I've had all kinds of other font problems with Xojo.

    Has anyone else seen this before? What is going on here?

    Thanks!

  2. Michel B

    1 Apr 2014 Pre-Release Testers, Xojo Pro RubberViews.com

    @Kimball L Has anyone else seen this before? What is going on here?

    The nine superior is Unicode &u2079. Nothing to do with curly quotes, sometimes substituted by word processors.

    Have you tried to change font ?

  3. Kimball L

    1 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    yes, I've changed fonts. Here is the same screen with the upper label using the OpenSans font (from google), with the lower label still using Ubuntu Light.

    -image-

    Note that the baseline / leading is all screwed up with the OpenSans font, but the apostrophe is correct.

    Also, as soon as I changed the font, clicked another item in the UI editor, then clicked back to the label I just changed the font on, I can no longer change the font:
    -image-

    And this seems to be stuck this way. Reloading project / restarting Xojo makes no change. I can't adjust the font on this Label anymore. :-(

  4. Kimball L

    1 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    In fact, now I can't set the font for ANY label in this project in the IDE.

    Time to fire up Feedback.

  5. Jason K

    1 Apr 2014 Pre-Release Testers

    Click on the gear in the inspector and you should see the fonts again. This was changed for 2014r1.

  6. Kimball L

    1 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    Wow. What an annoying change. Odd that I didn't notice it until just now, and that the font controls were where they used to be until I changed the font on this specific label.

    At any rate.... little nines instead of apostrophe characters. Any other thoughts?

  7. Tim J

    2 Apr 2014 Pre-Release Testers, Xojo Pro Dehydrating in AZ

    What happens if you change the encoding of the string to UTF8?

  8. Kimball L

    2 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    This is an excellent question. After some research, it appears that the apostrophe character is expressed in UTF-8 as E2 80 99, and prints this character: ’ instead of the tick mark '. Modern text editors / word processors such as Word, Pages, etc will auto-change ' to ’, as the typography is more pleasant that way.

    The problem this introduces is that the apostrophe character was not included in the original ASCII character set, so it is must be interepreted as UTF-8. This should be all well and good, as Xojo has good support for multiple encodings.

    Now, as to your question: I'm storing this string as a constant, where it appears there is no way to define the encoding. This means that in the IDE when laying out the window, if I set the value of the label to be #THE_NAME_OF_THE_CONSTANT it goes ahead and wires up the label to show the value of the named constant, with the incorrect character shown as I can only assume it is not encoding things correctly.

    At runtime, I suppose I could re-set all the labels by running the constants through a defineEncoding() call, but why should I have to?

    Is there really no way to define an encoding on a string constant?

  9. Kimball L

    2 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    Hmm, even when I explicitly set the label's text to be the result of defineEncoding(CONSTANT_NAME, Encodings.UTF-8) I still get the wrong character showing there.

    If I put a breakpoint on the define encoding call, I can see that the constant seems to think it is already using the UTF-8 encoding, (before being passed to defineEncoding(), so something else must be going on here.

  10. Norman P

    2 Apr 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...
    Edited 5 years ago

    A really tiny sample & bug report would be interesting to peek through
    Platform ?
    etc
    Sounds like this should be really reproducible

  11. Michel B

    2 Apr 2014 Pre-Release Testers, Xojo Pro RubberViews.com

    @Kimball L I set the value of the label to be #THE_NAME_OF_THE_CONSTANT it goes ahead and wires up the label to show the value of the named constant, with the incorrect character shown as I can only assume it is not encoding things correctly.

    Instead of a constant, what happens if you set the value as plain text ?

  12. Kimball L

    2 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    @Norman P - here is the constant definition from the IDE:

    -image-

    Note that the apostrophe character there (in the what's next?) is NOT just a tick mark, but is an actual apostrophe character, as discussed above.

  13. Norman P

    2 Apr 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    Well not sure about the font but cutting a sentence from pages
    Something funky with ‘something’ is going on
    from Pages & pasting it into the value of the constant & using it shows the same as in Pages

  14. Norman P

    2 Apr 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...
    Edited 5 years ago

    OK I typed that exact same phrase into a little test here &, except for the font setting, things are fine.

    What if you use a font like System ? Does it work fine ?
    That would lead me to suspect the font somehow

    EDIT : Scratch that
    Installed all the fonts here on OS X 10.8.5 and things just work like I'd expect
    No superscripted 9's here

  15. Kimball L

    2 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    I think I'm beginning to agree with you Norm - I thought I'd seen this with other fonts, but I've tried several dozen now and have not been able to reproduce it on anything but the Ubuntu font. Even Ubuntu Mono does it correctly.

    Dang. The decision maker really wanted to use this font. I'll have to hunt for something else that is close and still handles baseline and leading correctly (nearly none that I've tried do so - see here: https://forum.xojo.com/5353-some-fonts-clipped-in-labels/p1#p72369 )

  16. Norman P

    2 Apr 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    Odd I tried all three variants but not tons of sizes and got no little 9's in any trials

  17. Kimball L

    2 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    Really? Could be as stupid as I need to re-download the Ubuntu font?

  18. Norman P

    2 Apr 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    No idea - what font style & size were you trying ?
    Any adornments like Bold Italic Underline etc ?

  19. Kimball L

    2 Apr 2014 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    I'm just using the Ubuntu font plain. No adornments, and it happens at all sizes. Seems to be happening in other apps as well, such as Notepad and Pages. Even after re-installing the font.

    How odd.

    Well, bottom line: We can't use the Ubuntu font. We'll try others instead... which leads me to my latest bug report:
    Feedback Case #32967

  20. Bill G

    2 Apr 2014 Pre-Release Testers
    Edited 5 years ago

    Just a thought - have you turned off Smart Quotes in the system preferences?
    Apple symbol > System preferences… > Keyboard > Text > Uncheck “Use smart quotes and dashes”

    (edit: I just read other fonts aren't doing it - never mind, this probably isn't it.)

  21. Newer ›

or Sign Up to reply!