Output Unicode Text from collection of unicode values

    Apr 18 2013 | 8:44 pm
    I would like to read through a collection of values and have them output the specified standard unicode character. Does anyone know of a simple and efficient way to go about this?
    Thanks for the help, Joey

    • Apr 18 2013 | 10:26 pm
      Please restate your question with a lot more detail.
    • Apr 19 2013 | 3:41 am
      Well, essentially I have a set of unicode values that reference symbols, and I'd like to find a way of triggering the symbols on output.
      Say I want to output the symbol ⊇ who's technical information is: SUPERSET OF OR EQUAL TO Unicode: U+2287, UTF-8: E2 8A 87
      I need to find a way of calling "U+2287" and having it output the appropriate unicode symbol. Is there a way to access the alphabet Max uses to output characters?
      I've thought about storing the symbols specifically in a coll or dictionary and triggering output in common ways, but this will not work my purposes, as I need to output more complex symbols that can only be created by successive unicode commands. For example:
      ≫̏ is a combination of U+226B followed by U+030F.
      If I put the two symbols inside of a coll or dict, the successive output looks like: ≫ ̏
    • Apr 19 2013 | 1:52 pm
      I don't yet know what version of Max you are using nor what OS/platform. These can make substantial differences as unicode support on Max/OSx is better then Max/Windows. Also is how/where you will use or display this character. There are different abilities in mgraphics, the max window, jit.gl.text2d, 3d, etc.
      Try using the (itoa) object sending in your integer value and see if you get the output you want. And continue using the like method to test it feeding into the place that you want to view the character.
    • Apr 19 2013 | 2:33 pm
      Max uses UTF-8 encoding for its text and the itoa object works fine for multibyte UTF-8 characters:
      Best, Jeremy
    • Apr 19 2013 | 6:45 pm
      Thanks to you both, I'll get to work with this.
    • Apr 24 2013 | 7:01 pm
      Jeremy, are you expecting your patch to work on Windows? My experience is that Windows unicode support is lesser than on Macintosh. For example, the patch you posted above fails to display any of the three unicode characters from your messagebox. Instead, the resulting message box on Windows shows a square for them all.
    • Apr 24 2013 | 7:25 pm
      Do you have a Unicode-compatible font on Windows? My vanilla Win7-x64 with Arial displays 2 of the 3 glyphs (not the one in the middle, though).
      In any case, this is with 99% certainty a font issue, rather than an OS or Max issue. I'll see if I can't find a font which includes the middle glyph and get back.
    • Apr 24 2013 | 7:33 pm
      Here, the Tibetan Machine Unicode font supports all three of the glyphs in my patch: http://www.aerifal.cx/~dalias/bodyig/fonts/