1999-08-08 07:31:18 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: strconv.h
|
|
|
|
// Purpose: conversion routines for char sets any Unicode
|
|
|
|
// Author: Robert Roebling, Ove Kaaven
|
|
|
|
// Modified by:
|
|
|
|
// Created: 29/01/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 1998 Ove Kaaven, Robert Roebling, Vadim Zeitlin
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-08-08 07:31:18 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_WXSTRCONVH__
|
|
|
|
#define _WX_WXSTRCONVH__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/wxchar.h"
|
|
|
|
#include "wx/buffer.h"
|
|
|
|
|
2003-05-11 16:02:40 -04:00
|
|
|
#ifdef __DIGITALMARS__
|
|
|
|
#include "typeinfo.h"
|
|
|
|
#endif
|
|
|
|
|
1999-12-14 18:32:53 -05:00
|
|
|
#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
|
|
|
|
# undef __BSEXCPT__
|
|
|
|
#endif
|
2001-05-31 16:27:37 -04:00
|
|
|
|
1999-08-08 07:31:18 -04:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#if wxUSE_WCHAR_T
|
|
|
|
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
2003-09-22 16:29:15 -04:00
|
|
|
// wxMBConv (abstract base class for conversions)
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
|
2003-07-01 21:59:24 -04:00
|
|
|
class WXDLLIMPEXP_BASE wxMBConv
|
1999-08-08 07:31:18 -04:00
|
|
|
{
|
|
|
|
public:
|
1999-10-04 16:15:38 -04:00
|
|
|
// the actual conversion takes place here
|
2003-09-22 16:29:15 -04:00
|
|
|
//
|
2004-10-30 16:16:25 -04:00
|
|
|
// note that outputSize is the size of the output buffer, not the length of input
|
2004-06-10 08:01:59 -04:00
|
|
|
// (the latter is always supposed to be NUL-terminated)
|
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const = 0;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const = 0;
|
1999-10-04 16:15:38 -04:00
|
|
|
|
2003-09-22 16:29:15 -04:00
|
|
|
// MB <-> WC
|
1999-10-04 16:15:38 -04:00
|
|
|
const wxWCharBuffer cMB2WC(const char *psz) const;
|
|
|
|
const wxCharBuffer cWC2MB(const wchar_t *psz) const;
|
1999-08-08 07:31:18 -04:00
|
|
|
|
2004-11-06 03:23:50 -05:00
|
|
|
// MB <-> WC for strings with embedded null characters
|
|
|
|
//
|
|
|
|
// pszLen length of the input string
|
|
|
|
// pOutSize gets the final size of the converted string
|
|
|
|
const wxWCharBuffer cMB2WC(const char *psz, size_t pszLen, size_t* pOutSize) const;
|
|
|
|
const wxCharBuffer cWC2MB(const wchar_t *psz, size_t pszLen, size_t* pOutSize) const;
|
|
|
|
|
2003-09-22 16:29:15 -04:00
|
|
|
// convenience functions for converting MB or WC to/from wxWin default
|
1999-08-08 07:31:18 -04:00
|
|
|
#if wxUSE_UNICODE
|
1999-10-04 16:15:38 -04:00
|
|
|
const wxWCharBuffer cMB2WX(const char *psz) const { return cMB2WC(psz); }
|
|
|
|
const wxCharBuffer cWX2MB(const wchar_t *psz) const { return cWC2MB(psz); }
|
|
|
|
const wchar_t* cWC2WX(const wchar_t *psz) const { return psz; }
|
2000-07-15 15:51:35 -04:00
|
|
|
const wchar_t* cWX2WC(const wchar_t *psz) const { return psz; }
|
1999-10-04 16:15:38 -04:00
|
|
|
#else // ANSI
|
|
|
|
const char* cMB2WX(const char *psz) const { return psz; }
|
|
|
|
const char* cWX2MB(const char *psz) const { return psz; }
|
|
|
|
const wxCharBuffer cWC2WX(const wchar_t *psz) const { return cWC2MB(psz); }
|
|
|
|
const wxWCharBuffer cWX2WC(const char *psz) const { return cMB2WC(psz); }
|
|
|
|
#endif // Unicode/ANSI
|
2002-12-04 09:11:26 -05:00
|
|
|
|
|
|
|
// virtual dtor for any base class
|
2004-10-12 16:48:22 -04:00
|
|
|
virtual ~wxMBConv();
|
1999-08-08 07:31:18 -04:00
|
|
|
};
|
|
|
|
|
2003-09-22 16:29:15 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxMBConvLibc uses standard mbstowcs() and wcstombs() functions for
|
|
|
|
// conversion (hence it depends on the current locale)
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_BASE wxMBConvLibc : public wxMBConv
|
|
|
|
{
|
|
|
|
public:
|
2004-06-10 08:01:59 -04:00
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
2003-09-22 16:29:15 -04:00
|
|
|
};
|
|
|
|
|
2005-03-30 11:29:40 -05:00
|
|
|
#ifdef __UNIX__
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxConvBrokenFileNames is made for Unix in Unicode mode when
|
|
|
|
// files are accidentally written in an encoding which is not
|
|
|
|
// the system encoding. Typically, the system encoding will be
|
|
|
|
// UTF8 but there might be files stored in ISO8859-1 on disk.
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_BASE wxConvBrokenFileNames : public wxMBConv
|
|
|
|
{
|
|
|
|
public:
|
2005-04-13 16:05:57 -04:00
|
|
|
wxConvBrokenFileNames(const wxChar *charset);
|
2005-03-30 11:29:40 -05:00
|
|
|
virtual ~wxConvBrokenFileNames() { delete m_conv; }
|
|
|
|
|
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// the conversion object we forward to
|
|
|
|
wxMBConv *m_conv;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
// wxMBConvUTF7 (for conversion using UTF7 encoding)
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
|
2003-07-01 21:59:24 -04:00
|
|
|
class WXDLLIMPEXP_BASE wxMBConvUTF7 : public wxMBConv
|
1999-08-08 07:31:18 -04:00
|
|
|
{
|
|
|
|
public:
|
2004-06-10 08:01:59 -04:00
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
1999-08-08 07:31:18 -04:00
|
|
|
};
|
|
|
|
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
// wxMBConvUTF8 (for conversion using UTF8 encoding)
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
|
2003-07-01 21:59:24 -04:00
|
|
|
class WXDLLIMPEXP_BASE wxMBConvUTF8 : public wxMBConv
|
1999-08-08 07:31:18 -04:00
|
|
|
{
|
|
|
|
public:
|
2005-03-27 12:23:15 -05:00
|
|
|
enum {
|
|
|
|
MAP_INVALID_UTF8_NOT = 0,
|
|
|
|
MAP_INVALID_UTF8_TO_PUA = 1,
|
|
|
|
MAP_INVALID_UTF8_TO_OCTAL = 2
|
|
|
|
};
|
|
|
|
|
|
|
|
wxMBConvUTF8(int options = MAP_INVALID_UTF8_NOT) : m_options(options) { }
|
2004-06-10 08:01:59 -04:00
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
2005-03-27 12:23:15 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
int m_options;
|
1999-08-08 07:31:18 -04:00
|
|
|
};
|
|
|
|
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
2003-09-21 20:12:10 -04:00
|
|
|
// wxMBConvUTF16LE (for conversion using UTF16 Little Endian encoding)
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_BASE wxMBConvUTF16LE : public wxMBConv
|
|
|
|
{
|
|
|
|
public:
|
2004-06-10 08:01:59 -04:00
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
2003-09-21 20:12:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxMBConvUTF16BE (for conversion using UTF16 Big Endian encoding)
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_BASE wxMBConvUTF16BE : public wxMBConv
|
|
|
|
{
|
|
|
|
public:
|
2004-06-10 08:01:59 -04:00
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
2003-09-21 20:12:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2005-08-08 18:05:05 -04:00
|
|
|
// wxMBConvUTF32LE (for conversion using UTF32 Little Endian encoding)
|
2003-09-21 20:12:10 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_BASE wxMBConvUTF32LE : public wxMBConv
|
|
|
|
{
|
|
|
|
public:
|
2004-06-10 08:01:59 -04:00
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
2003-09-21 20:12:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2005-08-08 18:05:05 -04:00
|
|
|
// wxMBConvUTF32BE (for conversion using UTF32 Big Endian encoding)
|
2003-09-21 20:12:10 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_BASE wxMBConvUTF32BE : public wxMBConv
|
|
|
|
{
|
|
|
|
public:
|
2004-06-10 08:01:59 -04:00
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
2003-09-21 20:12:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
1999-10-04 16:15:38 -04:00
|
|
|
// wxCSConv (for conversion based on loadable char sets)
|
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
|
2003-09-19 18:18:06 -04:00
|
|
|
#include "wx/fontenc.h"
|
|
|
|
|
2003-07-01 21:59:24 -04:00
|
|
|
class WXDLLIMPEXP_BASE wxCSConv : public wxMBConv
|
1999-08-08 07:31:18 -04:00
|
|
|
{
|
|
|
|
public:
|
2003-09-22 13:11:56 -04:00
|
|
|
// we can be created either from charset name or from an encoding constant
|
|
|
|
// but we can't have both at once
|
1999-10-04 16:15:38 -04:00
|
|
|
wxCSConv(const wxChar *charset);
|
2003-09-19 18:18:06 -04:00
|
|
|
wxCSConv(wxFontEncoding encoding);
|
2003-09-22 13:11:56 -04:00
|
|
|
|
2002-05-07 16:40:04 -04:00
|
|
|
wxCSConv(const wxCSConv& conv);
|
1999-10-04 16:15:38 -04:00
|
|
|
virtual ~wxCSConv();
|
|
|
|
|
2002-05-07 16:40:04 -04:00
|
|
|
wxCSConv& operator=(const wxCSConv& conv);
|
2002-12-04 09:11:26 -05:00
|
|
|
|
2004-06-10 08:01:59 -04:00
|
|
|
virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
|
|
|
|
virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
|
1999-10-04 16:15:38 -04:00
|
|
|
|
2002-04-04 08:13:51 -05:00
|
|
|
void Clear() ;
|
|
|
|
|
1999-10-04 16:15:38 -04:00
|
|
|
private:
|
2003-09-19 18:18:06 -04:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
2003-09-22 13:11:56 -04:00
|
|
|
// creates m_convReal if necessary
|
|
|
|
void CreateConvIfNeeded() const;
|
|
|
|
|
|
|
|
// do create m_convReal (unconditionally)
|
|
|
|
wxMBConv *DoCreate() const;
|
|
|
|
|
2003-09-26 12:55:53 -04:00
|
|
|
// set the name (may be only called when m_name == NULL), makes copy of
|
|
|
|
// charset string
|
1999-10-04 16:15:38 -04:00
|
|
|
void SetName(const wxChar *charset);
|
|
|
|
|
2003-09-22 13:11:56 -04:00
|
|
|
|
2001-05-31 16:27:37 -04:00
|
|
|
// note that we can't use wxString here because of compilation
|
|
|
|
// dependencies: we're included from wx/string.h
|
1999-10-04 16:15:38 -04:00
|
|
|
wxChar *m_name;
|
2003-09-19 18:18:06 -04:00
|
|
|
wxFontEncoding m_encoding;
|
2003-09-22 13:11:56 -04:00
|
|
|
|
|
|
|
// use CreateConvIfNeeded() before accessing m_convReal!
|
|
|
|
wxMBConv *m_convReal;
|
1999-10-04 16:15:38 -04:00
|
|
|
bool m_deferred;
|
1999-08-08 07:31:18 -04:00
|
|
|
};
|
|
|
|
|
2005-03-30 03:00:45 -05:00
|
|
|
|
2005-03-23 19:59:08 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// declare predefined conversion objects
|
|
|
|
// ----------------------------------------------------------------------------
|
2004-11-17 10:14:35 -05:00
|
|
|
|
2005-03-23 19:59:08 -05:00
|
|
|
// conversion to be used with all standard functions affected by locale, e.g.
|
|
|
|
// strtol(), strftime(), ...
|
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxMBConv&) wxConvLibc;
|
|
|
|
|
|
|
|
// conversion ISO-8859-1/UTF-7/UTF-8 <-> wchar_t
|
2005-01-21 13:48:22 -05:00
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxCSConv&) wxConvISO8859_1;
|
2005-03-23 19:59:08 -05:00
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxMBConvUTF7&) wxConvUTF7;
|
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxMBConvUTF8&) wxConvUTF8;
|
|
|
|
|
|
|
|
// conversion used for the file names on the systems where they're not Unicode
|
|
|
|
// (basically anything except Windows)
|
|
|
|
//
|
|
|
|
// this is used by all file functions, can be changed by the application
|
|
|
|
//
|
|
|
|
// by default UTF-8 under Mac OS X and wxConvLibc elsewhere (but it's not used
|
|
|
|
// under Windows normally)
|
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvFileName;
|
|
|
|
|
|
|
|
// backwards compatible define
|
|
|
|
#define wxConvFile (*wxConvFileName)
|
|
|
|
|
|
|
|
// the current conversion object, may be set to any conversion, is used by
|
|
|
|
// default in a couple of places inside wx (initially same as wxConvLibc)
|
2005-01-21 13:48:22 -05:00
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent;
|
1999-08-08 07:31:18 -04:00
|
|
|
|
2005-03-23 19:59:08 -05:00
|
|
|
// ???
|
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxCSConv&) wxConvLocal;
|
|
|
|
|
|
|
|
|
2003-09-22 13:11:56 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// endianness-dependent conversions
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifdef WORDS_BIGENDIAN
|
|
|
|
typedef wxMBConvUTF16BE wxMBConvUTF16;
|
|
|
|
typedef wxMBConvUTF32BE wxMBConvUTF32;
|
|
|
|
#else
|
|
|
|
typedef wxMBConvUTF16LE wxMBConvUTF16;
|
|
|
|
typedef wxMBConvUTF32LE wxMBConvUTF32;
|
|
|
|
#endif
|
|
|
|
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
// filename conversion macros
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
|
|
|
|
// filenames are multibyte on Unix and probably widechar on Windows?
|
2003-03-27 15:14:39 -05:00
|
|
|
#if defined(__UNIX__) || defined(__BORLANDC__) || defined(__WXMAC__ )
|
1999-10-04 16:15:38 -04:00
|
|
|
#define wxMBFILES 1
|
1999-08-08 07:31:18 -04:00
|
|
|
#else
|
1999-10-04 16:15:38 -04:00
|
|
|
#define wxMBFILES 0
|
1999-08-08 07:31:18 -04:00
|
|
|
#endif
|
|
|
|
|
1999-10-28 06:29:51 -04:00
|
|
|
#if wxMBFILES && wxUSE_UNICODE
|
2005-03-23 19:59:08 -05:00
|
|
|
#define wxFNCONV(name) wxConvFileName->cWX2MB(name)
|
1999-10-04 16:15:38 -04:00
|
|
|
#define wxFNSTRINGCAST wxMBSTRINGCAST
|
2004-11-17 10:14:35 -05:00
|
|
|
#else
|
|
|
|
#if defined( __WXOSX__ ) && wxMBFILES
|
2005-03-23 19:59:08 -05:00
|
|
|
#define wxFNCONV(name) wxConvFileName->cWC2MB( wxConvLocal.cWX2WC(name) )
|
1999-08-08 07:31:18 -04:00
|
|
|
#else
|
1999-10-04 16:15:38 -04:00
|
|
|
#define wxFNCONV(name) name
|
2004-11-17 10:14:35 -05:00
|
|
|
#endif
|
1999-10-04 16:15:38 -04:00
|
|
|
#define wxFNSTRINGCAST WXSTRINGCAST
|
1999-08-08 07:31:18 -04:00
|
|
|
#endif
|
|
|
|
|
2005-03-23 19:59:08 -05:00
|
|
|
#else // !wxUSE_WCHAR_T
|
1999-08-08 07:31:18 -04:00
|
|
|
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
// stand-ins in absence of wchar_t
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-08-08 07:31:18 -04:00
|
|
|
|
2003-07-01 21:59:24 -04:00
|
|
|
class WXDLLIMPEXP_BASE wxMBConv
|
1999-08-08 07:31:18 -04:00
|
|
|
{
|
|
|
|
public:
|
1999-10-04 16:15:38 -04:00
|
|
|
const char* cMB2WX(const char *psz) const { return psz; }
|
|
|
|
const char* cWX2MB(const char *psz) const { return psz; }
|
1999-08-08 07:31:18 -04:00
|
|
|
};
|
1999-10-04 16:15:38 -04:00
|
|
|
|
2003-09-22 16:29:15 -04:00
|
|
|
#define wxConvFile wxConvLocal
|
|
|
|
|
2005-01-21 13:48:22 -05:00
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxMBConv) wxConvLibc,
|
2003-09-19 18:18:06 -04:00
|
|
|
wxConvLocal,
|
|
|
|
wxConvISO8859_1,
|
|
|
|
wxConvUTF8;
|
2005-01-21 13:48:22 -05:00
|
|
|
extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent;
|
1999-08-08 07:31:18 -04:00
|
|
|
|
|
|
|
#define wxFNCONV(name) name
|
1999-10-04 16:15:38 -04:00
|
|
|
#define wxFNSTRINGCAST WXSTRINGCAST
|
1999-08-08 07:31:18 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// wxUSE_WCHAR_T
|
|
|
|
|
1999-10-04 16:15:38 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// macros for the most common conversions
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#if wxUSE_UNICODE
|
|
|
|
#define wxConvertWX2MB(s) wxConvCurrent->cWX2MB(s)
|
|
|
|
#define wxConvertMB2WX(s) wxConvCurrent->cMB2WX(s)
|
|
|
|
#else // ANSI
|
|
|
|
// no conversions to do
|
|
|
|
#define wxConvertWX2MB(s) (s)
|
|
|
|
#define wxConvertMB2WX(s) (s)
|
|
|
|
#endif // Unicode/ANSI
|
|
|
|
|
|
|
|
#endif
|
1999-08-08 07:31:18 -04:00
|
|
|
// _WX_WXSTRCONVH__
|
|
|
|
|