Open Bug 1644384 Opened 4 years ago Updated 4 years ago

Importing .vcf file with long UTF-8 name causes messy characters

Categories

(Thunderbird :: Untriaged, enhancement)

enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: ku, Unassigned)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36

Steps to reproduce:

Import .vcf file export by Windows Live Mail.

In my case, it has Japanese characters.

For reproduction purpose, I have replaced the actual name with dummy Zenkaku alphabet characters.

Actual results:

The imported person name made messy:

ThisIsALBDngNameP85rson
Exp8FrtedByLiEFeMail

Expected results:

In Windows Live Mail:

ThisIsALongNamePerson
ExportedByLiveMail

This relates to #1330189.
Any entry with name or address that contains non-ASCII characters is, when exported to vcf file, encoded in UTF-8, but importing it back to address book inteprets them as ISO8859-1 and become messy characters. This is quite problematic for non English users.

The bug persists in version 78.5.0 (32-bit). Moreover, I could not solve the problem, because when translating the cyrillic UTF8 into the 8859-1 encoding, the Cyrillic letters are replaced with question marks, which, by the way, is logical.
Rolling back to Thunderbird 68?

Moreover, I could not solve the problem

Hi I have attached another vcf file

ThisIsALongNamePerson ExportedByLiveMailWithoutLF.vcf.

How about this file?

This another file doesn't contain = mark at end of line which means:

A soft line break consists of an = at the end of an encoded line, and does not appear as a line break in the decoded text.

https://en.wikipedia.org/wiki/Quoted-printable

Good afternoon! In the case of your file, everything is perfectly imported: due to the Latin encoding, try adding a contact in Japanese or Russian.
Perhaps this solution, but in the form of a rake - a support. This bug must be resolved at the level of the import module code.

Контакт
Отображаемое имя: ThisIsALongNamePerson ExportedByLiveMail

Hi

ThisIsALongNamePerson ExportedByLiveMail

This is a UTF-8 encoded text:

BEGIN:VCARD
VERSION:2.1
N;CHARSET=utf-8;ENCODING=QUOTED-PRINTABLE:=EF=BC=B4=...
FN;CHARSET=utf-8;ENCODING=QUOTED-PRINTABLE:=EF=BC=B4=...
REV:20200609T113612Z
END:VCARD
=EF=BC=B4 T
=EF=BD=88 h
=EF=BD=89 i
=EF=BD=93 s
=EF=BC=A9 I
=EF=BD=93 s
=EF=BC=A1 A
=EF=BC=AC L
=EF=BD=8F o
=EF=BD=8E n
=EF=BD=87 g
=EF=BC=AE N
=EF=BD=81 a
=EF=BD=8D m
=EF=BD=85 e
=EF=BC=B0 P
=EF=BD=85 e
=EF=BD=92 r
=EF=BD=93 s
=EF=BD=8F o
=EF=BD=8E n
;
=EF=BC=A5 E
=EF=BD=98 x
=EF=BD=90 p
=EF=BD=8F o
=EF=BD=92 r
=EF=BD=94 t
=EF=BD=85 e
=EF=BD=84 d
=EF=BC=A2 B
=EF=BD=99 y
=EF=BC=AC L
=EF=BD=89 i
=EF=BD=96 v
=EF=BD=85 e
=EF=BC=AD M
=EF=BD=81 a
=EF=BD=89 i
=EF=BD=8C l

It may be problem of QuotedPrinterable decoder that reading ThisIsALongNamePerson ExportedByLiveMail.vcf contains invalid characters.

BEGIN:VCARD
VERSION:2.1
N;CHARSET=utf-8;ENCODING=QUOTED-PRINTABLE:=EF=BC=B4=EF=BD=88=EF=BD=89=EF=BD=93=EF=BC=A9=EF=BD=93=EF=BC=A1=EF=BC=AC=EF=
=BD=8F=EF=BD=8E=EF=BD=87=EF=BC=AE=EF=BD=81=EF=BD=8D=EF=BD=85=EF=BC=B0=EF=BD=
=85=EF=BD=92=EF=BD=93=EF=BD=8F=EF=BD=8E;=EF=BC=A5=EF=BD=98=EF=BD=90=EF=BD=
=8F=EF=BD=92=EF=BD=94=EF=BD=85=EF=BD=84=EF=BC=A2=EF=BD=99=EF=BC=AC=EF=BD=89=
=EF=BD=96=EF=BD=85=EF=BC=AD=EF=BD=81=EF=BD=89=EF=BD=8C
FN;CHARSET=utf-8;ENCODING=QUOTED-PRINTABLE:=EF=BC=B4=EF=BD=88=EF=BD=89=EF=BD=93=EF=BC=A9=EF=BD=93=EF=BC=A1=EF=BC=AC=EF=
=BD=8F=EF=BD=8E=EF=BD=87=EF=BC=AE=EF=BD=81=EF=BD=8D=EF=BD=85=EF=BC=B0=EF=BD=
=85=EF=BD=92=EF=BD=93=EF=BD=8F=EF=BD=8E =EF=BC=A5=EF=BD=98=EF=BD=90=EF=BD=
=8F=EF=BD=92=EF=BD=94=EF=BD=85=EF=BD=84=EF=BC=A2=EF=BD=99=EF=BC=AC=EF=BD=89=
=EF=BD=96=EF=BD=85=EF=BC=AD=EF=BD=81=EF=BD=89=EF=BD=8C
REV:20200609T113612Z
END:VCARD

As Wikipedia says, The tail = mark means that it should erase tail CR+LF or LF codes.

https://en.wikipedia.org/wiki/Quoted-printable

It is like multiline define in C language

#define DEBUG_BREAK(a)\
    if ((a)) \
    __asm int 3;
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: