FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour E-Mail UTF8 problem?
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: E-Mail UTF8 problem?
Posted: Wed Jul 21, 2021 06:46 AM
Dear Dutch, I have tested your code
You just need to add at the beginning
Code (fw): Select all Collapse
HB_SETCODEPAGE( "UTF8" )

There's no need
Code (fw): Select all Collapse
//Fw_SetUnicode( .T. )

No additional change is necessary
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: E-Mail UTF8 problem?
Posted: Wed Jul 21, 2021 02:38 PM
cnavarro wrote:Dear Dutch, I have tested your code
You just need to add at the beginning
Code (fw): Select all Collapse
HB_SETCODEPAGE( "UTF8" )

There's no need
Code (fw): Select all Collapse
//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.)
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: E-Mail UTF8 problem?
Posted: Wed Jul 21, 2021 06:01 PM

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

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: E-Mail UTF8 problem?
Posted: Thu Jul 22, 2021 04:37 AM
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.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: E-Mail UTF8 problem?
Posted: Sat Jul 24, 2021 09:08 AM
Dear cnavarro,

I add as your suggestion as below but no success. Cloud you send me the code that you try and success please?

Thank you in advance.
Code (fw): Select all Collapse
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 (fw): Select all Collapse
HB_SETCODEPAGE( "UTF8" )

There's no need
Code (fw): Select all Collapse
//Fw_SetUnicode( .T. )

No additional change is necessary
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: E-Mail UTF8 problem?
Posted: Sat Jul 24, 2021 10:11 AM
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

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: E-Mail UTF8 problem?
Posted: Sat Jul 24, 2021 12:10 PM
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.

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

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: E-Mail UTF8 problem?
Posted: Sat Jul 24, 2021 07:58 PM

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

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: E-Mail UTF8 problem?
Posted: Sun Jul 25, 2021 01:28 AM
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
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: E-Mail UTF8 problem?
Posted: Sun Jul 25, 2021 02:05 PM
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
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: E-Mail UTF8 problem?
Posted: Fri Jul 30, 2021 09:27 AM
Dear Dutch
Please try with this
Code (fw): Select all Collapse
:HTMLBody := hb_StrtoUtf8( cHtml )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: E-Mail UTF8 problem?
Posted: Fri Jul 30, 2021 10:54 AM
Dear cnavarro,

It doesn't work. It's still unreadable.
cnavarro wrote:Dear Dutch
Please try with this
Code (fw): Select all Collapse
:HTMLBody := hb_StrtoUtf8( cHtml )
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: E-Mail UTF8 problem?
Posted: Fri Jul 30, 2021 11:00 AM
There are other possibilities that you will have to try
Code (fw): Select all Collapse
:HTMLBody := hb_strtoutf8( hb_ansitooem( cHtml ) )

Code (fw): Select all Collapse
:HTMLBody := hb_strtoutf8( cHtml, <your language> )   //  as example: "ESWIN"

Code (fw): Select all Collapse
:HTMLBody := hb_strtoutf8( hb_ansitooem( cHtml ), <your language> )   //  as example: "ESWIN"

Please try and tell me
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: E-Mail UTF8 problem?
Posted: Sat Jul 31, 2021 11:02 AM
Dear cnavarro,

It doesn't work as previous try.
cnavarro wrote:There are other possibilities that you will have to try
Code (fw): Select all Collapse
:HTMLBody := hb_strtoutf8( hb_ansitooem( cHtml ) )

Code (fw): Select all Collapse
:HTMLBody := hb_strtoutf8( cHtml, <your language> ) 聽 // 聽as example: "ESWIN"

Code (fw): Select all Collapse
:HTMLBody := hb_strtoutf8( hb_ansitooem( cHtml ), <your language> ) 聽 // 聽as example: "ESWIN"

Please try and tell me
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion