tunderin Member Licensed User Longtime User May 13, 2014 #1 Hello... My app is a field component of a desktop based system and receives database updates via email. I'm currently building an alternate method of doing that by emailing the argument for SQL ADD/UPDATE in the message body to the mobiles. This is a sample of what the desktop system put in the body of the email: Code: Copy "INSERT INTO Claims('Claim_Name'‚'Company'‚'Policy_Number'‚'Policy_Form'‚'Assign_Date'‚'Claim_Number'‚'Type_of_Property'‚'Num_Families'‚'Date_of_Loss'‚'Date_Reported') VALUES ('M999999 Amesbury'‚'MPIUA'‚'436729'‚'HO 00 03 10 00'‚'6/7/2012'‚'M999999'‚'Dwelling'‚'Single Family'‚'6/1/2012'‚'6/7/2012')" I'm using the Net library & ParseMail to receive the message. This is what I receive - The commas in the original have all been replaced with the string "=E2=80=9A" Code: Copy "INSERT INTO Claims('Claim_Name'=E2=80=9A'Company'=E2=80=9A'Policy_Number'=E2=80=9A'Policy_Form'=E2=80=9A'Assign_Date'=E2=80=9A'Claim_Number'=E2=80=9A'Type_of_Property'=E2=80=9A'Num_Families'=E2=80=9A'Date_of_Loss'=E2=80=9A'Date_Reported') VALUES ('M999999 ..... etc This is the beginning of the POP_DownloadCompleted sub, where a copy of the raw message is logged: Code: Copy Private Sub POP_DownloadCompleted (Success As Boolean, MessageId As Int, MessageText As String) Dim bm() As Byte = MessageText.GetBytes("ISO-8859-1") Log(BytesToString(bm, 0, bm.Length, "UTF8"))' show me the raw message as received Finally, from the message headers, the encoding info: Code: Copy Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Can anybody help get my commas back? Thanks for any help... Last edited: May 13, 2014
Hello... My app is a field component of a desktop based system and receives database updates via email. I'm currently building an alternate method of doing that by emailing the argument for SQL ADD/UPDATE in the message body to the mobiles. This is a sample of what the desktop system put in the body of the email: Code: Copy "INSERT INTO Claims('Claim_Name'‚'Company'‚'Policy_Number'‚'Policy_Form'‚'Assign_Date'‚'Claim_Number'‚'Type_of_Property'‚'Num_Families'‚'Date_of_Loss'‚'Date_Reported') VALUES ('M999999 Amesbury'‚'MPIUA'‚'436729'‚'HO 00 03 10 00'‚'6/7/2012'‚'M999999'‚'Dwelling'‚'Single Family'‚'6/1/2012'‚'6/7/2012')" I'm using the Net library & ParseMail to receive the message. This is what I receive - The commas in the original have all been replaced with the string "=E2=80=9A" Code: Copy "INSERT INTO Claims('Claim_Name'=E2=80=9A'Company'=E2=80=9A'Policy_Number'=E2=80=9A'Policy_Form'=E2=80=9A'Assign_Date'=E2=80=9A'Claim_Number'=E2=80=9A'Type_of_Property'=E2=80=9A'Num_Families'=E2=80=9A'Date_of_Loss'=E2=80=9A'Date_Reported') VALUES ('M999999 ..... etc This is the beginning of the POP_DownloadCompleted sub, where a copy of the raw message is logged: Code: Copy Private Sub POP_DownloadCompleted (Success As Boolean, MessageId As Int, MessageText As String) Dim bm() As Byte = MessageText.GetBytes("ISO-8859-1") Log(BytesToString(bm, 0, bm.Length, "UTF8"))' show me the raw message as received Finally, from the message headers, the encoding info: Code: Copy Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Can anybody help get my commas back? Thanks for any help...
Erel B4X founder Staff member Licensed User Longtime User May 13, 2014 #2 How are you sending the mail? One possible solution is to encode the string with base64. This will solve all encoding issues. Upvote 0
How are you sending the mail? One possible solution is to encode the string with base64. This will solve all encoding issues.
J James Chamblin Active Member Licensed User Longtime User May 13, 2014 #3 The characters e2 80 9a is for a single low-9 quotation mark, not for a comma. , <- comma (Unicode 002C) ‚ <-single low-9 quotation mark (Unicode 201A). Looks exactly the same, but the latter is not recognized by SQL. Might want to find out why your email is converting the commas like that. Upvote 0
The characters e2 80 9a is for a single low-9 quotation mark, not for a comma. , <- comma (Unicode 002C) ‚ <-single low-9 quotation mark (Unicode 201A). Looks exactly the same, but the latter is not recognized by SQL. Might want to find out why your email is converting the commas like that.