Skip to content

Unicode Support

Billy Quith edited this page Jul 31, 2013 · 5 revisions

GWEN TextObjects contain Unicode wide strings and narrow ASCII strings (i.e. the Unicode code points are lost on conversion). There doesn't seem much benefit in this. It may as well be full Unicode, since this information is only display in the GWEN UI.

Refs

Options

All wstring

  • Make all GWEN strings wide strings. Remove TextObject.
  • Convert the whole library to use wide strings.
  • Allegro would have to convert to UTF8 on the fly (which it does now). (Cache converted strings?)

All narrow

TextObject contains UTF8

  • Change the non-wide string in TextObject to be UTF8. This could then be passed to Renderers that require this (like Allegro).
    • It may be the case that this is what is supposed to be happening at the moment and this is a bug. There are no comments or docmentation so I don't know. The Unicode string is passed to the Renderer anyway.
  • Renderers are changed to receive TextObjects instead of Unicode strings.

Compile option narrow/wide

  • A compile-time option is added to allow choice of narrow (e.g. UTF8) or wide (e.g. UTF16) strings.
  • All string handling is abstracted internally.
Clone this wiki locally