Problem seeing some characters when sending email to Outlook client

N

Nobody

Guy Gorton said:
Glad you chipped in to this thread. I have been looking for someone
with Access expertise which your sig suggests you have.
In its simplest terms, the problem is that I have a large database on
Paradox. It works beautifully and I am amazed that the system loads
on to new Windows versions from the old 3 1/2 inch discs, so far
without problems, but that cannot last!
Main database with some 12,000 records, a number of related files,
lots of queries, some reports.
I have 2 or 3 smaller applucations on Paradox as well, but they are
not as important.
Is there a way of transferring the definitions to Access and the data?
Always assuming, of course, that Access is a relational database
engine.

I just checked with Access 2002, and one of the file formats that it can
open is Paradox. You can also access the data directly from ADO, see "Open
Paradox" in this article:

HOW TO: Use Jet OLE DB Provider 4.0 to Connect to ISAM Databases
http://support.microsoft.com/default.aspx?scid=kb;en-us;326548

From VB, you can use ADO's OpenSchema method to retrieve the list of
databases(adSchemaCatalogs), tables(adSchemaTables), and
fields(adSchemaColumns). I am not sure if it will work with Paradox
databases. See "OpenSchema method [ADO]" in MSDN, which includes VB sample.
You may also want to check this article:

How To Use the ADO OpenSchema Method in Visual Basic
http://support.microsoft.com/kb/186246
 
T

Tony Toews

Paradox. It works beautifully and I am amazed that the system loads
on to new Windows versions from the old 3 1/2 inch discs, so far
without problems, but that cannot last!

Frequently MS products installed from floppies could be loaded onto a
CD or hard drive in folders named Disk1, Disk2, Disk3, etc. Or maye
the disks had those subfolders on them. Then when you ran the setup
from the first Disk1, or maybe it was in the root folder, I can't
recall now, the setup would install from all the subfolders. Thus you
no longer needed to have floppies lying around.
Is there a way of transferring the definitions to Access and the data?

You've already got some answers. I have a vague memory that Access
2010 no longer supports Paradox.
Always assuming, of course, that Access is a relational database
engine.

Some would disagree but yes, Jet, the default database engine of
Access, is fully relational.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
G

Guy Gorton

VB6 comes with ODBC drivers for paradox and access (among many others)
so you can use that at the least to copy it.
Access may even have an import form a data source feature.
Thanks for your help.
Next time however, try starting a new thread and asking in relevant
groups rather than hijacking a completely unrelated conversation.

The unrelated bit was the poster's sig - and a very helpful one. I
presumed that we would go off to some other group, but how to find the
relevant one is not straightforward..

Guy Gorton
 
V

Viken Cerpovna

Guy Gorton said:
Glad you chipped in to this thread. I have been looking for someone
with Access expertise which your sig suggests you have.
In its simplest terms, the problem is that I have a large database on
Paradox. It works beautifully and I am amazed that the system loads
on to new Windows versions from the old 3 1/2 inch discs, so far
without problems, but that cannot last!
Main database with some 12,000 records, a number of related files,
lots of queries, some reports.
I have 2 or 3 smaller applucations on Paradox as well, but they are
not as important.
Is there a way of transferring the definitions to Access and the data?
Always assuming, of course, that Access is a relational database
engine.
TIA

Guy Gorton


Not sure which version of Paradox and Access you are using but there is an
import feature in Access that enables you to either create a linked table in
the database for the Paradox database, or, you can import the contents and
create a native table in Access. I have 2007 and the feature is located on
the External Data ribbon (click on the More option and you will see Paradox
in the list).
 
G

Guy Gorton

Not sure which version of Paradox and Access you are using but there is an
import feature in Access that enables you to either create a linked table in
the database for the Paradox database, or, you can import the contents and
create a native table in Access. I have 2007 and the feature is located on
the External Data ribbon (click on the More option and you will see Paradox
in the list).
Thanks. I have Paradox 5 and Access 2003. I have previously looked
for this kind of facility, but failed to find it. Will try again.

Guy Gorton
 
F

fniles

Hi,
Sorry, it takes a long time, but they agree not to put the arrow in
the email anymore, so we don't have that problem anymore, but there
are other characters that look ok in some email client software (like
in Gmail), but don't look ok in other email client software (like in
Outlook 2007).
When I go to Message Source window (# 6 & 7) for the original email,
it's in base64 (like ZyAmIEZ....), and it's pretty long to copy and
paste it on this post.
The forwarded email is not in base64, but it's also pretty long to
copy and paste it on this post.
Is there a way for me to attach a file here ?

The problem that I have right now is this:
The characters
“We
became
“We

3 . US Eastman To Expand 'Tritan' Capacity By End-2011
$7m [€5m]
became
$7m [€5m]

Thank you.
 
N

Nobody

Usually, but not always, when some characters expands to 3 characters, it
means that it's encoded in UTF-8.


Hi,
Sorry, it takes a long time, but they agree not to put the arrow in
the email anymore, so we don't have that problem anymore, but there
are other characters that look ok in some email client software (like
in Gmail), but don't look ok in other email client software (like in
Outlook 2007).
When I go to Message Source window (# 6 & 7) for the original email,
it's in base64 (like ZyAmIEZ....), and it's pretty long to copy and
paste it on this post.
The forwarded email is not in base64, but it's also pretty long to
copy and paste it on this post.
Is there a way for me to attach a file here ?

The problem that I have right now is this:
The characters
“We
became
“We

3 . US Eastman To Expand 'Tritan' Capacity By End-2011
$7m [€5m]
became
$7m [€5m]

Thank you.
 
F

fniles

Hi, sorry, but what did you mean by expand to 3 characters ?
The problem that I have is

became
“

and

became
€
 
R

Raymond Schmit

Hi, sorry, but what did you mean by expand to 3 characters ?
The problem that I have is

became
“

and

became
€
I show you what i see in your post (inserting an extra space)
The problem that I have is

became
â € œ

and

became
â ‚ ¬

The 3 characters are the utf8 representation of the single iso
character.
 
N

Nobody

fniles said:
Hi, sorry, but what did you mean by expand to 3 characters ?
The problem that I have is

became
“

These 3 characters in Hex are:

â = E2
€ = 80
œ = 9C

E2 80 9C

Or in Binary:

1110 0010 1000 0000 1001 1100

From "UTF-8 bytes" column here:
http://en.wikipedia.org/wiki/UTF-8#Description we could reconstruct the
Unicode-16 character code. It looks like in the range of U+0800 to U+FFFF.

1110 zzzz = E2 = 1110 0010
10yy yyyy = 80 = 1000 0000
10xx xxxx = 9C = 1001 1100

So,

zzzz = 0010
yy yyyy = 00 0000
xx xxxx = 01 1100

The original code is:

zzzzyyyy yyxxxxxx = 0010 0000 0001 1100

So it's &H201C in Unicode. Entering "201C" at the search box at the top of
this page will show you what it looks like, and the character name:

http://www.unicode.org/charts/

Here is the link to the PDF:

http://www.unicode.org/charts/PDF/U2000.pdf

If you go to page 2 of the PDF, it shows that it's name is "Left double
quotation mark".
and

became
€

Similarly, these 3 characters in Hex are:

â = E2
‚ = 82
¬ = AC

E2 82 AC

Or in Binary:

1110 0010 1000 0010 1010 1100

This too looks like in the range of U+0800 to U+FFFF.

1110 zzzz = E2 = 1110 0010
10yy yyyy = 82 = 1000 0010
10xx xxxx = AC = 1010 1100

zzzz = 0010
yy yyyy = 00 0010
xx xxxx = 10 1100

The original code is:

zzzzyyyy yyxxxxxx = 0010 0000 1010 1100

So it's &H20AC in Unicode. Entering "20AC" at the search box at the top of
the page above shows that its name is "Euro sign".

Obviously, you can write a VB function for this, but others have already
done so. Here is an API based one:

http://groups.google.com/group/microsoft.public.vb.general.discussion/msg/21d8ec60ad5cfd23
 
F

fniles

Thank you for your reply.
This is in the email that I read
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>

Here are more information:
The original email that I read is in base64.
I use the Function DecodeBase64String from EVICT_POP3.dll to decode
the base64, I am including its code below.
After that function, when I trace my program, and I do
?mid(sraw,instr(1,sraw,"roughly $7m"),20)
it returns
roughly $7m [€5m]
instead of
roughly $7m [€5m]

If I write sraw to a file, it will show as
roughly $7m [€5m]

When the email gets to the Outlook clients, some clients see them as
$7m [€5m], but some see them as $7m [€5m], even though both clients
are using the exact same version of Outlook 2007.

What do you suggest I do ?
How do I use the function FromUTF8Buf (from the API that you included)
to fix my problem ?

Thanks again.

Public Function DecodeBase64String(str2Decode As String) As String
' Coerce 4 base 64 encoded bytes into 3 decoded bytes by converting
4, 6 bit
' values (0 to 63) into 3, 8 bit values. Transform the 8 bit value
into its
' ascii character equivalent. Stop converting at the end of the
input string
' or when the first '=' (equal sign) is encountered.

533 On Error GoTo ErrorHandler
534 Dim lPtr As Long
535 Dim iValue As Integer
536 Dim iLen As Integer
537 Dim iCtr As Integer
538 Dim Bits(1 To 4) As Byte
539 Dim strDecode As String
540 Dim lPtr2 As Long

' Clean it up and create the destination buffer
541 str2Decode = Replace(str2Decode, vbCrLf, "")
542 lPtr2 = 0
543 strDecode = String$(Len(str2Decode) * 3 / 4 + 3, " ")
' for each 4 character group....
544 For lPtr = 1 To Len(str2Decode) Step 4
545 iLen = 4
546 For iCtr = 0 To 3
' retrive the base 64 value, 4 at a time
547 iValue = InStr(1, BASE64CHR, Mid$(str2Decode, lPtr +
iCtr, 1), vbBinaryCompare)
548 Select Case iValue
' A~Za~z0~9+/
Case 1 To 64: Bits(iCtr + 1) = iValue - 1
' =
549 Case 65
550 iLen = iCtr
551 Exit For
' not found
552 Case 0
553 Exit Function
554 End Select
555 Next iCtr

' convert the 4, 6 bit values into 3, 8 bit values
556 Bits(1) = Bits(1) * &H4 + (Bits(2) And &H30) \ &H10
557 Bits(2) = (Bits(2) And &HF) * &H10 + (Bits(3) And &H3C) \
&H4
558 Bits(3) = (Bits(3) And &H3) * &H40 + Bits(4)

' add the three new characters to the output string
559 For iCtr = 1 To iLen - 1
560 lPtr2 = lPtr2 + 1
561 Mid$(strDecode, lPtr2, 1) = Chr$(Bits(iCtr))
562 Next iCtr

563 Next lPtr

564 DecodeBase64String = Left$(strDecode, lPtr2)

565 Exit Function
 
N

Nobody

fniles said:
Thank you for your reply.
This is in the email that I read
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>

Are you including the above line in the email that you are sending?
Here are more information:
The original email that I read is in base64.
I use the Function DecodeBase64String from EVICT_POP3.dll to decode
the base64, I am including its code below.
After that function, when I trace my program, and I do
?mid(sraw,instr(1,sraw,"roughly $7m"),20)
it returns
roughly $7m [€5m]
instead of
roughly $7m [€5m]

If I write sraw to a file, it will show as
roughly $7m [€5m]

If that what appears in the file, then somewhere in the process the text was
UTF-8 decoded. VB doesn't do that. How did you save the file?
When the email gets to the Outlook clients, some clients see them as
$7m [€5m], but some see them as $7m [€5m], even though both clients
are using the exact same version of Outlook 2007.

If the META line above which tells the charset used is missing in when
sending to some clients, then the user would see "€" instead of "€".

When you send the emails, do you send them individually, or do you send one
email to multiple recipients?
What do you suggest I do ?
How do I use the function FromUTF8Buf (from the API that you included)
to fix my problem ?

See the last few lines in that post to see how its used. However, if you are
decoding it to make some changes, then resend it, you need to encode the
result to UTF-8 by using ToUTF8Buf() before sending it.
 
N

Nobody

I forgot to use UTF-8 in my email program, so my previous email was showing
? instead of the euro sign. Here is the email again:
Thank you for your reply.
This is in the email that I read
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>

Are you including the above line in the email that you are sending?
Here are more information:
The original email that I read is in base64.
I use the Function DecodeBase64String from EVICT_POP3.dll to decode
the base64, I am including its code below.
After that function, when I trace my program, and I do
?mid(sraw,instr(1,sraw,"roughly $7m"),20)
it returns
roughly $7m [?5m]
instead of
roughly $7m [5m]

If I write sraw to a file, it will show as
roughly $7m [5m]

If that what appears in the file, then somewhere in the process the text was
UTF-8 decoded. VB doesn't do that. How did you save the file?
When the email gets to the Outlook clients, some clients see them as
$7m [?5m], but some see them as $7m [5m], even though both clients
are using the exact same version of Outlook 2007.

If the META line above which tells the charset used is missing in when
sending to some clients, then the user would see "?" instead of "".

When you send the emails, do you send them individually, or do you send one
email to multiple recipients?
What do you suggest I do ?
How do I use the function FromUTF8Buf (from the API that you included)
to fix my problem ?

See the last few lines in that post to see how its used. However, if you are
decoding it to make some changes, then resend it, you need to encode the
result to UTF-8 by using ToUTF8Buf() before sending it.
 
F

fniles

Are you including the above line in the email that you are sending? Yes

If that what appears in the file, then somewhere in the process the text was UTF-8 decoded. VB doesn't do that. How did you save the file?
Did you mean between the call POP3.DecodeBase64String and before I
sent the email the text was UTF-8 decoded ?

These are my codes:
sRaw = POP3.DecodeBase64String(Mid(sRaw, iStart, iEnd - iStart))
'At this point in the Immediate window ?mid(sraw,instr(1,sraw,"roughly
$7m"),20) returns "roughly $7m [€5m]"
Open App.Path & "\raw.txt" For Append As #4 'write to the file.
Print #4, sRaw
'The raw.txt file contains "roughly $7m [€5m]", not "roughly $7m
[€5m]"
Close #4
'Do you think by changing sRaw below I am decoding it ?
sRaw = Mid(sRaw, InStr(sRaw, "<"))
iix = InStr(sRaw, "src=" & Chr(34) & "cid:")
iIx2 = InStr(iix + 5, sRaw, Chr(34))
sCID = Mid(sRaw, iix, iIx2 - iix + 1)
sRaw = Replace(sRaw, sCID, "src=cologo.jpg")
poSendMail.Attachment = App.Path & "\cologo.JPG"
poSendMail.Message = sRaw
When you send the emails, do you send them individually, or do you send one email to multiple recipients?
I send the same email to multiple recipients delimited by ";". The
email doesnt have Recipient, but it has BccRecipient and CcRecipient.
See the last few lines in that post to see how its used. However, if you are decoding it to make some changes, then resend it, you need to encode the
result to UTF-8 by using ToUTF8Buf() before sending it.
From looking at my code above, do you think I decoded the email ?
Did you mean before sending the email, I need to do the following
UTF8String = ToUTF8(sRaw)
poSendMail.Message = UTF8String
where sRaw contains the entire email ?
When I did that, the email looks bad in my Outlook 2007 (previously
the email was good on my Outlook 2007, but bad on another Outlook
2007):
Now I see
roughly $7m [€5m]
instead of
roughly $7m [€5m]


Thank you



fnileswrote:
Thank you for your reply.
This is in the email that I read
<METAcontent="text/html; charset=UTF-8" http-equiv=Content-Type>

Are you including the above line in the email that you are sending?
Here are more information:
The original email that I read is in base64.
I use the Function DecodeBase64String from EVICT_POP3.dll to decode
the base64, I am including its code below.
After that function, when I trace my program, and I do
?mid(sraw,instr(1,sraw,"roughly $7m"),20)
it returns
roughly $7m [€5m]
instead of
roughly $7m [ 5m]
If I write sraw to a file, it will show as
roughly $7m [ 5m]

If that what appears in the file, then somewhere in the process the text was
UTF-8 decoded. VB doesn't do that. How did you save the file?
When the email gets to the Outlook clients, some clients see them as
$7m [€5m], but some see them as $7m [ 5m], even though both clients
are using the exact same version of Outlook 2007.

If theMETAline above which tells the charset used is missing in when
sending to some clients, then the user would see "€" instead of " ".

When you send the emails, do you send them individually, or do you send one
email to multiple recipients?
What do you suggest I do ?
How do I use the function FromUTF8Buf (from the API that you included)
to fix my problem ?

See the last few lines in that post to see how its used. However, if you are
decoding it to make some changes, then resend it, you need to encode the
result to UTF-8 by using ToUTF8Buf() before sending it.
 
N

Nobody

One more time. I was using OE-QuoteFix, and it seems that it changes the
encoding method just before sending.

http://home.in.tum.de/~jain/software/oe-quotefix/

Here is the email again. I hope that the euro sign shows up this time.

Thank you for your reply.
This is in the email that I read
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>

Are you including the above line in the email that you are sending?
Here are more information:
The original email that I read is in base64.
I use the Function DecodeBase64String from EVICT_POP3.dll to decode
the base64, I am including its code below.
After that function, when I trace my program, and I do
?mid(sraw,instr(1,sraw,"roughly $7m"),20)
it returns
roughly $7m [?5m]
instead of
roughly $7m [5m]

If I write sraw to a file, it will show as
roughly $7m [5m]

If that what appears in the file, then somewhere in the process the text was
UTF-8 decoded. VB doesn't do that. How did you save the file?
When the email gets to the Outlook clients, some clients see them as
$7m [?5m], but some see them as $7m [5m], even though both clients
are using the exact same version of Outlook 2007.

If the META line above which tells the charset used is missing in when
sending to some clients, then the user would see "?" instead of "".

When you send the emails, do you send them individually, or do you send one
email to multiple recipients?
What do you suggest I do ?
How do I use the function FromUTF8Buf (from the API that you included)
to fix my problem ?

See the last few lines in that post to see how its used. However, if you are
decoding it to make some changes, then resend it, you need to encode the
result to UTF-8 by using ToUTF8Buf() before sending it.
 
N

Nobody

fniles said:
Did you mean between the call POP3.DecodeBase64String and before I
sent the email the text was UTF-8 decoded ?

Please disregard that. I found out that Notepad is the one that does UTF-8
decoding. Perhaps it auto detects it. Use a Hex editor or a simpler text
viewer than Notepad! Perhaps a simple VB app with a TextBox. Here is a
sample code to duplicate the problem:

Option Explicit

Private Sub Form_Load()
Dim sRaw As String

sRaw = Chr(&HE2) & Chr(&H82) & Chr(&HAC)
Open "C:\raw.txt" For Append As #1
Print #1, sRaw
Close #1

End Sub

In a Hex editor I see:

E2 82 AC 0D 0A

In Notepad under XP, I see one character, the Euro sign.

These are my codes:
sRaw = POP3.DecodeBase64String(Mid(sRaw, iStart, iEnd - iStart))
'At this point in the Immediate window ?mid(sraw,instr(1,sraw,"roughly
$7m"),20) returns "roughly $7m [â,¬5m]"
Open App.Path & "\raw.txt" For Append As #4 'write to the file.
Print #4, sRaw
'The raw.txt file contains "roughly $7m [?5m]", not "roughly $7m
[â,¬5m]"
Close #4
'Do you think by changing sRaw below I am decoding it ?
sRaw = Mid(sRaw, InStr(sRaw, "<"))
iix = InStr(sRaw, "src=" & Chr(34) & "cid:")
iIx2 = InStr(iix + 5, sRaw, Chr(34))
sCID = Mid(sRaw, iix, iIx2 - iix + 1)
sRaw = Replace(sRaw, sCID, "src=cologo.jpg")
poSendMail.Attachment = App.Path & "\cologo.JPG"
poSendMail.Message = sRaw
When you send the emails, do you send them individually, or do you
send one email to multiple recipients?
I send the same email to multiple recipients delimited by ";". The
email doesnt have Recipient, but it has BccRecipient and CcRecipient.
See the last few lines in that post to see how its used. However, if
you are decoding it to make some changes, then resend it, you need
to encode the result to UTF-8 by using ToUTF8Buf() before sending
it.
From looking at my code above, do you think I decoded the email ?

You did Base64 decoding, but you didn't do UTF-8 decoding, which is okay.
Did you mean before sending the email, I need to do the following
UTF8String = ToUTF8(sRaw)
poSendMail.Message = UTF8String
where sRaw contains the entire email ?

No. I assumed that you want to change the text in the email, which it
appears that you are not doing. If you want to change the text, and you are
adding or replacing characters in the range 128+, then you can do it in 3
steps:

1 - Do UTF-8 Decode.
2 - Change the text.
3 - Do UTF-8 Encode.
When I did that, the email looks bad in my Outlook 2007 (previously
the email was good on my Outlook 2007, but bad on another Outlook
2007):
Now I see
roughly $7m [â,¬5m]
instead of
roughly $7m [?5m]

That's expected. Doing UTF-8 Encoding more than once will result on
different output each time if the input had characters in the range 128+.
 
F

fniles

So, I don't need to do
UTF8String = ToUTF8(sRaw) ?
I assumed that you want to change the text in the email, which it appears that you are not doing
I do replace the "cid:" with "src=cologo.jpg" in the email as shown
below, but this is not what you mean by "changing the text in the
email" ?
sRaw = Mid(sRaw, InStr(sRaw, "<"))
iix = InStr(sRaw, "src=" & Chr(34) & "cid:")
iIx2 = InStr(iix + 5, sRaw, Chr(34))
sCID = Mid(sRaw, iix, iIx2 - iix + 1)
sRaw = Replace(sRaw, sCID, "src=cologo.jpg")
You did Base64 decoding, but you didn't do UTF-8 decoding, which is okay.
So, since I didn't do UTF-8 decoding, what causes some Outlook 2007
clients to see
roughly $7m [€5m]
as
roughly $7m [€5m]
?

How can I fix the problem so that all Outlook clients see the correct
characters ?

Thanks for your help.




fnileswrote:
Did you mean between  the call POP3.DecodeBase64String and before I
sent the email the text was UTF-8 decoded ?

Please disregard that. I found out that Notepad is the one that does UTF-8
decoding. Perhaps it auto detects it. Use a Hex editor or a simpler text
viewer than Notepad! Perhaps a simple VB app with a TextBox. Here is a
sample code to duplicate the problem:

Option Explicit

Private Sub Form_Load()
    Dim sRaw As String

    sRaw = Chr(&HE2) & Chr(&H82) & Chr(&HAC)
    Open "C:\raw.txt" For Append As #1
    Print #1, sRaw
    Close #1

End Sub

In a Hex editor I see:

E2 82 AC 0D 0A

In Notepad under XP, I see one character, the Euro sign.




These are my codes:
sRaw = POP3.DecodeBase64String(Mid(sRaw, iStart, iEnd - iStart))
'At this point in the Immediate window ?mid(sraw,instr(1,sraw,"roughly
$7m"),20) returns "roughly $7m [ , 5m]"
Open App.Path & "\raw.txt" For Append As #4 'write to the file.
Print #4, sRaw
'The raw.txt file contains "roughly $7m [?5m]", not "roughly $7m
[ , 5m]"
Close #4
'Do you think by changing sRaw below I am decoding it ?
sRaw = Mid(sRaw, InStr(sRaw, "<"))
iix = InStr(sRaw, "src=" & Chr(34) & "cid:")
iIx2 = InStr(iix + 5, sRaw, Chr(34))
sCID = Mid(sRaw, iix, iIx2 - iix + 1)
sRaw = Replace(sRaw, sCID, "src=cologo.jpg")
poSendMail.Attachment = App.Path & "\cologo.JPG"
poSendMail.Message = sRaw
When you send the emails, do you send them individually, or do you
send one email to multiple recipients?
I send the same email to multiple recipients delimited by ";". The
email doesnt have Recipient, but it has BccRecipient and CcRecipient.
See the last few lines in that post to see how its used. However, if
you are decoding it to make some changes, then resend it, you need
to encode the result to UTF-8 by using ToUTF8Buf() before sending
it.
From looking at my code above, do you think I decoded the email ?

You did Base64 decoding, but you didn't do UTF-8 decoding, which is okay.
Did you mean before sending the email, I need to do the following
UTF8String = ToUTF8(sRaw)
poSendMail.Message = UTF8String
where sRaw contains the entire email ?

No. I assumed that you want to change the text in the email, which it
appears that you are not doing. If you want to change the text, and you are
adding or replacing characters in the range 128+, then you can do it in 3
steps:

1 - Do UTF-8 Decode.
2 - Change the text.
3 - Do UTF-8 Encode.
When I did that, the email looks bad in my Outlook 2007 (previously
the email was good on my Outlook 2007, but bad on another Outlook
2007):
Now I see
roughly $7m [ , 5m]
instead of
roughly $7m [?5m]

That's expected. Doing UTF-8 Encoding more than once will result on
different output each time if the input had characters in the range 128+.- Hide quoted text -

- Show quoted text -
 
N

Nobody

fniles said:
So, I don't need to do
UTF8String = ToUTF8(sRaw) ?

No you don't.
I do replace the "cid:" with "src=cologo.jpg" in the email as shown
below, but this is not what you mean by "changing the text in the
email" ?

You don't need to decode/modify/encode in this case, because all you are
replacing and adding in "cid:" is in the range of 0 to 127.
You did Base64 decoding, but you didn't do UTF-8 decoding, which is
okay.
So, since I didn't do UTF-8 decoding, what causes some Outlook 2007
clients to see
roughly $7m [€5m]
as
roughly $7m [€5m]
?

How can I fix the problem so that all Outlook clients see the correct
characters ?

If both clients received the same single email that you are sending to both,
then this leaves one conclusion: It's Outlook settings, and IE version that
are different that cause the discrepancy. Run Regedit, and export this key
from the two computers, and compare the settings:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook

Use the following free software to compare the two files:

http://winmerge.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top