Page 2 of 2

Re: E-Mail UTF8 problem?

PostPosted: Wed Jul 21, 2021 6:46 am
by cnavarro
Dear Dutch, I have tested your code
You just need to add at the beginning
Code: Select all  Expand view

HB_SETCODEPAGE( "UTF8" )
 

There's no need
Code: Select all  Expand view

//Fw_SetUnicode( .T. )
 

No additional change is necessary

Re: E-Mail UTF8 problem?

PostPosted: Wed Jul 21, 2021 2:38 pm
by richard-service
cnavarro wrote:Dear Dutch, I have tested your code
You just need to add at the beginning
Code: Select all  Expand view

HB_SETCODEPAGE( "UTF8" )
 

There's no need
Code: Select all  Expand view

//Fw_SetUnicode( .T. )
 

No additional change is necessary


Dear cnavarro,
Yes, same as my set for Harbour.
But use FWH input Unicode word, I think it need to use Fw_SetUnicode(.T.)

Re: E-Mail UTF8 problem?

PostPosted: Wed Jul 21, 2021 6:01 pm
by cnavarro
Dear Richard
I have not needed to use it, but perhaps because of the language that I am using by default on the computer, I have to use Fw_Unicode (.T.) or not be necessary. Is simply try

Re: E-Mail UTF8 problem?

PostPosted: Thu Jul 22, 2021 4:37 am
by richard-service
cnavarro wrote:Dear Richard
I have not needed to use it, but perhaps because of the language that I am using by default on the computer, I have to use Fw_Unicode (.T.) or not be necessary. Is simply try


OK. I will to try Email system for it.

Re: E-Mail UTF8 problem?

PostPosted: Sat Jul 24, 2021 9:08 am
by dutch
Dear cnavarro,

I add as your suggestion as below but no success. Cloud you send me the code that you try and success please?
Image
Thank you in advance.
Code: Select all  Expand view

FW_SetUnicode( .T. )

MYSQL_TinyIntAsLogical( .T. )

SET EPOCH TO year(date())-90
SET DATE FORMAT TO 'DD/MM/YY'
SET DATE BRITISH

HB_SETCODEPAGE( "UTF8" )



cnavarro wrote:Dear Dutch, I have tested your code
You just need to add at the beginning
Code: Select all  Expand view

HB_SETCODEPAGE( "UTF8" )
 

There's no need
Code: Select all  Expand view

//Fw_SetUnicode( .T. )
 

No additional change is necessary

Re: E-Mail UTF8 problem?

PostPosted: Sat Jul 24, 2021 10:11 am
by cnavarro
Dear Dutch
Please try with ( not with Fw_SetUnicode( .T. ) ), and tell me

HB_SETCODEPAGE( "UTF8" )

MYSQL_TinyIntAsLogical( .T. )

SET EPOCH TO year(date())-90
SET DATE FORMAT TO 'DD/MM/YY'
SET DATE BRITISH


Re: E-Mail UTF8 problem?

PostPosted: Sat Jul 24, 2021 12:10 pm
by dutch
Dear cnavarro,

Yes, it works correctly for Email but I the program use Fw_SetUnicode( .T. ). The SAY, Title of Dialog are unreadble, if I remove Fw_SetUnicode( .T. ) in the beginning of the program as picture.
Image
cnavarro wrote:Dear Dutch
Please try with ( not with Fw_SetUnicode( .T. ) ), and tell me

HB_SETCODEPAGE( "UTF8" )

MYSQL_TinyIntAsLogical( .T. )

SET EPOCH TO year(date())-90
SET DATE FORMAT TO 'DD/MM/YY'
SET DATE BRITISH


Re: E-Mail UTF8 problem?

PostPosted: Sat Jul 24, 2021 7:58 pm
by cnavarro
Dear Dutch
Try disabling Fw_SetUnicode (.F.) when entering the mail send function ( CDO ) and putting Fw_SetUnicode (.T.) right at the end of the function

Re: E-Mail UTF8 problem?

PostPosted: Sun Jul 25, 2021 1:28 am
by dutch
Dear cnavarro,

Thank you for your suggetion.
cnavarro wrote:Dear Dutch
Try disabling Fw_SetUnicode (.F.) when entering the mail send function ( CDO ) and putting Fw_SetUnicode (.T.) right at the end of the function

Re: E-Mail UTF8 problem?

PostPosted: Sun Jul 25, 2021 2:05 pm
by dutch
Dear cnavarro,

It did not work and strange behavior.
1. FW_SetUnicode( .T. ) at beginning
FW_SetUnicode( .F. )
Send Mail (CDO)
FW_SetUnicode( .T. )
* Mail is not readable *
2. Do not set anything
Send Mail (CDO)
* Mail is readable correctly *
* SAY and Title of Dialog is unreadable *
3. HB_SETCODEPAGE( "UTF8" ) doesn't effect any case.

FW_SetUnicode( .F. ) is not the same result of *Never Call FW_SetUnicode()*

cnavarro wrote:Dear Dutch
Try disabling Fw_SetUnicode (.F.) when entering the mail send function ( CDO ) and putting Fw_SetUnicode (.T.) right at the end of the function

Re: E-Mail UTF8 problem?

PostPosted: Fri Jul 30, 2021 9:27 am
by cnavarro
Dear Dutch
Please try with this
Code: Select all  Expand view

:HTMLBody := hb_StrtoUtf8( cHtml )
 

Re: E-Mail UTF8 problem?

PostPosted: Fri Jul 30, 2021 10:54 am
by dutch
Dear cnavarro,

It doesn't work. It's still unreadable.
cnavarro wrote:Dear Dutch
Please try with this
Code: Select all  Expand view

:HTMLBody := hb_StrtoUtf8( cHtml )
 

Re: E-Mail UTF8 problem?

PostPosted: Fri Jul 30, 2021 11:00 am
by cnavarro
There are other possibilities that you will have to try
Code: Select all  Expand view

:HTMLBody := hb_strtoutf8( hb_ansitooem( cHtml ) )
 

Code: Select all  Expand view

:HTMLBody := hb_strtoutf8( cHtml, <your language> )   //  as example: "ESWIN"
 

Code: Select all  Expand view

:HTMLBody := hb_strtoutf8( hb_ansitooem( cHtml ), <your language> )   //  as example: "ESWIN"
 

Please try and tell me

Re: E-Mail UTF8 problem?

PostPosted: Sat Jul 31, 2021 11:02 am
by dutch
Dear cnavarro,

It doesn't work as previous try.
cnavarro wrote:There are other possibilities that you will have to try
Code: Select all  Expand view

:HTMLBody := hb_strtoutf8( hb_ansitooem( cHtml ) )
 

Code: Select all  Expand view

:HTMLBody := hb_strtoutf8( cHtml, <your language> )   //  as example: "ESWIN"
 

Code: Select all  Expand view

:HTMLBody := hb_strtoutf8( hb_ansitooem( cHtml ), <your language> )   //  as example: "ESWIN"
 

Please try and tell me