Page 1 of 2

Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Fri Dec 08, 2023 8:41 am
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.

Re: Strange characters going from FWH to Outlook FWH 3.10

PostPosted: Fri Dec 08, 2023 9:27 am
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

Re: Strange characters going from FWH to Outlook FWH 3.10

PostPosted: Fri Dec 08, 2023 9:31 am
by driessen
Thanks, Antonio.

These are the signs which can have the problem:
Code: Select all  Expand view
"'(§è!çà)-âêîûôäëïöü

Re: Strange characters going from FWH to Outlook FWH 3.10

PostPosted: Fri Dec 08, 2023 12:16 pm
by Antonio Linares
Can you please post here the output you get ? thanks

Re: Strange characters going from FWH to Outlook FWH 3.10

PostPosted: Fri Dec 08, 2023 12:19 pm
by driessen
Antonio,

This is the output you asked for:
Code: Select all  Expand view
&é"'(§è!çà )-âêîûôäëïöü

Re: Strange characters going from FWH to Outlook FWH 3.10

PostPosted: Fri Dec 08, 2023 2:18 pm
by karinha
Driessen, prueba y comente, pls.

Code: Select all  Expand view

// 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.

Re: Strange characters going from FWH to Outlook FWH 3.10

PostPosted: Fri Dec 08, 2023 4:23 pm
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.

Re: Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Fri Dec 08, 2023 4:33 pm
by Antonio Linares
Dear Michel,

We are reviewing it

many thanks for your feedback

Re: Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Fri Dec 08, 2023 5:19 pm
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.

Re: Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Mon Dec 11, 2023 4:28 pm
by karinha
Driessen, maybe:

Code: Select all  Expand view

#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.

Re: Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Fri Dec 15, 2023 8:56 am
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.

Re: Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Fri Dec 15, 2023 9:36 am
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.

Re: Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Wed Jan 03, 2024 8:43 am
by driessen
Hello my friends,

Still no solution yet to my problem?

Thanks.

Re: Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Sat Feb 10, 2024 6:53 pm
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.

Re: Strange characters going from FWH to Outlook FWH 13.10

PostPosted: Sun Feb 18, 2024 2:53 pm
by nageswaragunupudi
Request:
Code: Select all  Expand view
#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()