Miguel sounds interesting, but you still need the type i listed bellow to hold unicode
Regards Luiz ----- Original Message ----- From: "Miguel Angel Marchuet Frutos" <[email protected]> To: "Luiz Rafael Culik Guimaraes" <[email protected]> Cc: "Xharbour-Developers" <[email protected]> Sent: Thursday, January 15, 2009 5:58 PM Subject: Re: [xHarbour-developers] Unicode builds and type standarize >I was thinking about to add flag to string items to inform >oem,ansi,wide,utf8... > and change operators len,+,left,right,substr,etc... to work properly > add function to retrive this flag information > > then to develop unicode aplication will be easier. > > what do you think about ? > > Best regards, > Miguel Angel Marchuet > > Luiz Rafael Culik Guimaraes escribió: >> Dear Friends >> >> I'd like to suggest if possible an new standart for xharbour api >> functions >> >> so we can build xharbour with unicode support >> >> is possible to use this standarization for all api declaration for char* >> /const char* >> >> #if defined (_UNICODE) && !defined (UNICODE) >> #define UNICODE >> #endif >> #if defined (UNICODE) && !defined (_UNICODE) >> #define _UNICODE >> #endif >> >> #ifndef _WIN32 >> #include <ctype.h> >> typedef unsigned long DWORD; >> typedef long LONG; >> typedef int BOOL; >> typedef unsigned char BYTE; >> typedef unsigned short WORD; >> typedef unsigned int UINT; >> >> typedef unsigned short WCHAR; // wc, 16-bit UNICODE character >> typedef const WCHAR *LPCWSTR; >> typedef const char *LPCSTR; >> typedef WCHAR *LPWSTR; >> typedef char *LPSTR; >> >> #ifdef _UNICODE >> typedef wchar_t TCHAR; >> typedef LPCWSTR LPCTSTR; >> typedef LPWSTR LPTSTR; >> #define _T(x) L ## x >> #else /* _UNICODE */ // r_winnt >> typedef char TCHAR; >> typedef LPCSTR LPCTSTR; >> typedef LPSTR LPTSTR; >> #define _T(x) x >> #endif /* _UNICODE */ // r_winnt >> >> >> #else >> #include <TCHAR.H> >> #include <windows.H> >> #ifndef STRICT >> #define STRICT >> #endif >> #endif >> >> >> and declare our functions >> From >> extern HB_FORCE_EXPORT char * hb_parc( int iParam, ... ); /* >> retrieve a string parameter */ >> extern HB_EXPORT char * hb_parcx( int iParam, ... ); /* >> retrieve a string parameter */ >> >> to >> extern HB_FORCE_EXPORT LPTSTR hb_parc( int iParam, ... ); /* >> retrieve a string parameter */ >> extern HB_EXPORT LPTSTR hb_parcx( int iParam, ... ); /* >> retrieve a string parameter */ >> >> this will make easy to build xharbour with unicode support >> >> Regards >> Luiz >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword >> _______________________________________________ >> xHarbour-developers mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/xharbour-developers >> >> >> > > ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ xHarbour-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xharbour-developers

