File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/src/main/kotlin/com/simplemobiletools/contacts/helpers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class VcfExporter {
3636 for (contact in contacts) {
3737 out .writeLn(BEGIN_VCARD )
3838 out .writeLn(VERSION_2_1 )
39- out .writeLn(" $N : ${getNames(contact)} " )
39+ out .writeLn(" $N${getNames(contact)} " )
4040
4141 contact.phoneNumbers.forEach {
4242 out .writeLn(" $TEL ;${getPhoneNumberLabel(it.type)} :${it.value} " )
@@ -92,6 +92,7 @@ class VcfExporter {
9292 }
9393
9494 private fun getNames (contact : Contact ): String {
95+ var result = " "
9596 var firstName = contact.firstName
9697 var surName = contact.surname
9798 var middleName = contact.middleName
@@ -102,9 +103,10 @@ class VcfExporter {
102103 firstName = QuotedPrintable .encode(firstName)
103104 surName = QuotedPrintable .encode(surName)
104105 middleName = QuotedPrintable .encode(middleName)
106+ result + = " ;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE"
105107 }
106108
107- return " $surName ;$firstName ;$middleName ;;"
109+ return " $result : $ surName ;$firstName ;$middleName ;;"
108110 }
109111
110112 private fun getPhoneNumberLabel (type : Int ) = when (type) {
You can’t perform that action at this time.
0 commit comments