Strange characters going from FWH to Outlook FWH 13.10

User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Strange characters going from FWH to Outlook FWH 13.10

Post by driessen »

Hello,

This problem started occuring since using FWH 13.10.
In FWH 13.07, everything is working just fine.

Usually I put the text of my e-mail into a memo to store it within my application.

In Dutch and French, a lot of special characters are used : àéèâêîôûäëïöü, etc.

In my application you can see them like this:Image.
But in Outlook they look totally different like this:Image.

Why is the appearing of these strange characters happening?

Thank you in advance for any help.
Last edited by driessen on Fri Dec 08, 2023 4:23 pm, edited 1 time in total.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Strange characters going from FWH to Outlook FWH 3.10

Post by Antonio Linares »

Dear Michel,

It may be related to the used codepage

Please post both texts here, not as an image (so we can copy and paste them), so we can analyze them

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Strange characters going from FWH to Outlook FWH 3.10

Post by driessen »

Thanks, Antonio.

These are the signs which can have the problem:

Code: Select all | Expand

&é"'(§è!çà)-âêîûôäëïöü
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Strange characters going from FWH to Outlook FWH 3.10

Post by Antonio Linares »

Can you please post here the output you get ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Strange characters going from FWH to Outlook FWH 3.10

Post by driessen »

Antonio,

This is the output you asked for:

Code: Select all | Expand

&é"'(§è!çà )-âêîûôäëïöü
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: Strange characters going from FWH to Outlook FWH 3.10

Post by karinha »

Driessen, prueba y comente, pls.

Code: Select all | Expand

// C:\FWH\SAMPLES\DRIESSEN.PRG

#Include "FiveWin.ch"

FUNCTION Main()

   LOCAL oWnd, oBar

   DEFINE WINDOW oWnd MDI

   ACTIVATE WINDOW oWnd ON INIT( TXT_Driessen() )

RETURN NIL

FUNCTION TXT_Driessen()

   LOCAL cTxt_Dri := SPACE( 50 )

   cTxt_Dri := [ &é"'(§è!çà)-âêîûôäëïöü ]

   ? cTxt_Dri

   ? OemToAnsi( cTxt_Dri )

   ? AnsiToOem( cTxt_Dri )

RETURN NIL

// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Strange characters going from FWH to Outlook FWH 3.10

Post by driessen »

Thanks for you reply.

This is the result which is shown:

cTxt_dri : &é"'(§è!çà)-âêîûôäëïöü

OemToAnsi ( cTxt_dri ) : &Ú"'(ºÞ!þÓ)-ÔÛ¯¹¶õÙ´÷³

AnsiToOem ( cTxt_dri ) : &‚"'(õŠ!‡…)-ƒˆŒ–“„‰‹”

It is strange that the problem does NOT occur in FWH 13.07.
It does occur in FWH 13.10.

So, what has been changed?

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Strange characters going from FWH to Outlook FWH 13.10

Post by Antonio Linares »

Dear Michel,

We are reviewing it

many thanks for your feedback
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: Strange characters going from FWH to Outlook FWH 13.10

Post by nageswaragunupudi »

This has nothing to do with ANSI/OEM issue even remotely.
This issue is about ANSI / UTF8.
We will get back to you soon.
Regards

G. N. Rao.
Hyderabad, India
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: Strange characters going from FWH to Outlook FWH 13.10

Post by karinha »

Driessen, maybe:

Code: Select all | Expand

#include "FiveWin.ch"

/* #translate SET CODEPAGE TO SPANISH           =>  REQUEST HB_CODEPAGE_ESWIN ; hb_setcodepage("ESWIN") */
// #translate SET CODEPAGE TO SPANISH              =>  REQUEST HB_CODEPAGE_ESWIN ; hb_cdpSelect("ESWIN")

REQUEST HB_CODEPAGE_ESWIN
REQUEST HB_LANG_ES
REQUEST HB_CODEPAGE_ES850C
REQUEST HB_CODEPAGE_ESISO

FUNCTION SALAZAR_UTF8()

   LOCAL cString, cStr

   //hb_setcodepage("ESWIN")
   //hb_cdpSelect("ESWIN")

   // O:

   HB_SETCODEPAGE('ES850C')
   HB_LANGSELECT('ES')
   
   HB_SETCODEPAGE( "UTF8" )

   // cStr :="áéíóú ÁÉÍÓÚ"
   cStr := [ &é"'(§è!çà)-âêîûôäëïöü ]

   cStr  := UPPER( TiraAcento( cStr ) )

   MEMOWRIT( ".\UTF8.txt",                           ;
             hb_strtoutf8(cStr)               +CRLF+ ;
             hb_strtoutf8(HB_AnsiToOem(cStr)) +CRLF+ ;
             HB_StrToUTF8( cStr,"ESWIN" ) )

   // Edit: UTF8.txt

RETURN NIL

FUNCTION TiraAcento( cText )

   LOCAL ARINICIO, ARFIM, XRETTEXT, ICTEXT, LETRACTEXT

   cText := StrTran(cText,"\","/")
   cText := StrTran(cText,"Ã","A")
   cText := StrTran(cText,"Â","A")
   cText := StrTran(cText,"Á","A")
   cText := StrTran(cText,"Ä","A")
   cText := StrTran(cText,"À","A")
   cText := StrTran(cText,"ã","a")
   cText := StrTran(cText,"â","a")
   cText := StrTran(cText,"á","a")
   cText := StrTran(cText,"ä","a")
   cText := StrTran(cText,"à","a")
   cText := StrTran(cText,"É","E")
   cText := StrTran(cText,"Ê","E")
   cText := StrTran(cText,"Ë","E")
   cText := StrTran(cText,"È","E")
   cText := StrTran(cText,"é","e")
   cText := StrTran(cText,"ê","e")
   cText := StrTran(cText,"ë","e")
   cText := StrTran(cText,"è","e")
   cText := StrTran(cText,"Í","I")
   cText := StrTran(cText,"Î","I")
   cText := StrTran(cText,"Ï","I")
   cText := StrTran(cText,"Ì","I")
   cText := StrTran(cText,"í","i")
   cText := StrTran(cText,"î","i")
   cText := StrTran(cText,"ï","i")
   cText := StrTran(cText,"ì","i")
   cText := StrTran(cText,"Ó","O")
   cText := StrTran(cText,"Õ","O")
   cText := StrTran(cText,"Ô","O")
   cText := StrTran(cText,"ó","o")
   cText := StrTran(cText,"Ö","O")
   cText := StrTran(cText,"Ò","O")
   cText := StrTran(cText,"õ","o")
   cText := StrTran(cText,"ô","o")
   cText := StrTran(cText,"ó","o")
   cText := StrTran(cText,"ö","o")
   cText := StrTran(cText,"ò","o")
   cText := StrTran(cText,"Û","U")
   cText := StrTran(cText,"Ú","U")
   cText := StrTran(cText,"Ü","U")
   cText := StrTran(cText,"Ù","U")
   cText := StrTran(cText,"û","u")
   cText := StrTran(cText,"ú","u")
   cText := StrTran(cText,"ü","u")
   cText := StrTran(cText,"ù","u")
   cText := StrTran(cText,"Ç","C")
   cText := StrTran(cText,"ç","c")
   cText := StrTran(cText,"£","E")
   cText := StrTran(cText,"&","E")
   cText := StrTran(cText,"<",".")
   cText := StrTran(cText,">",".")
   cText := StrTran(cText,"ª","a")
   cText := StrTran(cText,"º","o")
   cText := StrTran(cText,"´"," ")
   cText := StrTran(cText,"²","2")
   cText := StrTran(cText,"³"," ")
   cText := StrTran(cText,"¹","1")

   arINICIO := 32
   arFIM    := 126
   xRetText := ""

   For IcText=1 to len(cText)

      LetracText := subs( cText, IcText, 1 )

      if asc(LetracText)<arINICIO .or. asc(LetracText)>arFIM

         LetracText := " "

      end

      xRetText += LetracText

   next

RETURN(xRetText)

// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Strange characters going from FWH to Outlook FWH 13.10

Post by driessen »

Thank you for your suggestion.

But I don't think that is a solution to my problem.
Your suggestion replaces the characters with a sign by its normal character.
Since I need those special characters to put into official documents, I just can't replace them.
Names for instance without those special signs, would be illegal for the court.

Antonio, no solution yet? What changed from FWH 13.07 to 13.10? To my opinion it must be related to some changes in FWH 13.10.

Thanks.

A nice weekend to you all.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: Strange characters going from FWH to Outlook FWH 13.10

Post by nageswaragunupudi »

Antonio, no solution yet? What changed from FWH 13.07 to 13.10? To my opinion it must be related to some changes in FWH 13.10.
Please wait a little.
Regards

G. N. Rao.
Hyderabad, India
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Strange characters going from FWH to Outlook FWH 13.10

Post by driessen »

Hello my friends,

Still no solution yet to my problem?

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Strange characters going from FWH to Outlook FWH 13.10

Post by driessen »

Hello,

Until now, I didn't get any answer to my question concerning this problem.
It is starting to be quite urgent.

No solution yet?

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: Strange characters going from FWH to Outlook FWH 13.10

Post by nageswaragunupudi »

Request:

Code: Select all | Expand

#include "fivewin.ch"

function Main()

   ? HB_CDPSELECT(), HB_CDPUNIID(), GetACP(), GetOEMCP()

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( GETACP )   { hb_retni( GetACP() ); }
HB_FUNC( GETOEMCP ) { hb_retni( GetOEMCP() ); }

#pragma ENDDUMP
 
1) Can you please run this program and let us know the four results?
2) Can you also let us know if you set any codepage in your applications using HB_CDBPSELECT() or HB_SETCODEPAGE()
Regards

G. N. Rao.
Hyderabad, India
Post Reply