Really no change is necessary at xharbour, to finish your aplication.

GetValue and PutValue don't knows the content of char * saved at database
this is not important.

For example we save utf8 strings in a standard dbf, obviously we need to
overload comparation method to sort properly, but you don't have this problem.

If you use windows aplication don't need to convert unicode to PLWIN, you only 
need
to convert to wide to paint chars correctly.

for example

HB_EXPORT LPWSTR hb_oleUTF8ToWide( LPSTR cString )
{
    if( cString )
    {
       DWORD length;
       wchar_t * wString;

       length = MultiByteToWideChar( CP_UTF8, 0, cString, -1, NULL, 0 );
       wString = ( wchar_t * ) hb_xgrab( ( length + 1 ) * sizeof( wchar_t ) );
       if( MultiByteToWideChar( CP_UTF8, 0, cString, -1, wString, length + 1 ) )
          return (LPWSTR) wString;
       else
          hb_xfree( wString );
    }

    return NULL;
}

HB_FUNC( UTF8TOWIDE )  // ( cAnsiStr ) -> cWideStr
{
    char *cString = hb_parc( 1 );

    if( cString )
    {
       BSTR wString = hb_oleUTF8ToWide( cString );

       if( wString )
       {
          hb_retclenAdopt( (char *) wString, SysStringLen( wString ) );
          return;
       }
    }

    hb_ret();
    return;
}



__________ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 4489 (20091008) __________

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to