MessageBoxTimeout

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

MessageBoxTimeout

Post by Pablo César » Wed Nov 27, 2013 12:34 am

Hi Marek,

Look at this example:

Code: Select all

#include <hmg.ch>

Function Main()
Local cPortuguese:="EXPLICAÇÃO"
Local cSpanish:="EXPLICACIÓN"
Local cPolish:="WYJAŚNIENIE"

DBCREATE("Test", {{"UNICODE", "C", 20, 0},{"ANSI", "C", 20, 0},{"LANGUAGE", "C", 20, 0}},, .T.) 
DBAPPEND()

REPLACE UNICODE WITH cPortuguese
REPLACE ANSI WITH hb_UTF8ToStr(cPortuguese,"CP850")
REPLACE LANGUAGE WITH "Portuguese/CP850"
DBAPPEND()

REPLACE UNICODE WITH cSpanish
REPLACE ANSI WITH hb_UTF8ToStr(cSpanish,"CP850")
REPLACE LANGUAGE WITH "Spanish/CP850"
DBAPPEND()

REPLACE UNICODE WITH cPolish
REPLACE ANSI WITH hb_UTF8ToStr(cPolish,"CP852")
REPLACE LANGUAGE WITH "Polish/CP852"

MSGINFO( hb_strToUTF8 ( FIELD->ANSI, "CP852" ), "ANSI/UNICODE" )
MSGINFO( STR(HMG_LEN(ALLTRIM(FIELD->ANSI))) )

Return Nil
I made for Spanish, Portuguese and Polish the PRG file is UTF-8 and saves in DBF in ANSI. Give a look to ANSI in polish if is right written.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
mol
Posts: 3195
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 214 times
Been thanked: 120 times
Contact:

Post by mol » Wed Nov 27, 2013 6:11 am

Everything is Ok.
Thanks for sample!

User avatar
danielmaximiliano
Posts: 2117
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 144 times
Been thanked: 20 times
Contact:

Post by danielmaximiliano » Wed Nov 27, 2013 12:15 pm

+10 Pablo que buen ejemplo
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

Post Reply