musicmud-2.1.6/data/
musicmud-2.1.6/data/help/
musicmud-2.1.6/data/policy/
musicmud-2.1.6/data/wild/
musicmud-2.1.6/data/world/
musicmud-2.1.6/doc/
musicmud-2.1.6/src/ident/
musicmud-2.1.6/src/lua/
musicmud-2.1.6/src/lua/include/
musicmud-2.1.6/src/lua/src/lib/
musicmud-2.1.6/src/lua/src/lua/
musicmud-2.1.6/src/lua/src/luac/
#ifndef CHARSET_H
#define CHARSET_H

//! The character sets supported by the mud.
enum charset {
  //! ISO 8859-1
  CHAR_LATIN1,    
  //! ISO 646 IRV
  CHAR_ASCII,     
  //! ISO 10646-1 encded as UTF-8
  CHAR_UNICODE,   
  //! Apple MacRoman vendor encoding
  CHAR_MACROMAN,  /* Apple Macroman vendor encoding */
  //! MSDOS Latin-1 vendor encoding
  CHAR_CP850,
  //! MSDOS CP437 vendor encoding
  CHAR_CP437,
  //! A fake unicode encoding
  CHAR_FAKEUNI,
  //! Microsoft Windows Western Europe encoding
  CHAR_CP1252,
  //! KOI8-R (Russian)
  CHAR_KOI8R,
  CHAR_LAST,
};

class MudObject;

//! obtain the charset that /who/ is using
charset get_charset(const MudObject *who);

//! does the charset have a mapping table?
bool has_table(charset);

//! does given player have ability to display /uni/ directly?
bool player_knows(const MudObject *p, int uni);

//! convert unicode character to a codepoint in given charset. -1 for not there.
int uni2cp(int ch, charset);
//! convert codepage character to unicode.
int cp2uni(int ch, charset);

#endif