}
+ // Process N.
+
+ if (!NameTitle.IsEmpty() || !NameForename.IsEmpty() || !NameSurname.IsEmpty() ||
+ !NameOtherNames.IsEmpty() || !NameSuffix.IsEmpty()){
+
+ ProcessData.Append("N");
+
+ // Check if there is a value for ALTID.
+
+ if (NameAltID.size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append(NameAltID);
+
+ }
+
+ // Check if there is a value for LANGUAGE.
+
+ if (NameLanguage.size() > 0){
+
+ ProcessData.Append(";LANGUAGE=");
+ ProcessData.Append(NameLanguage);
+
+ }
+
+ // Check if there is a value for SORT-AS.
+
+ if (NameDisplayAs.size() > 0){
+
+ ProcessData.Append(";SORT-AS=\"");
+ ProcessData.Append(NameDisplayAs);
+ ProcessData.Append("\"");
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if (NameTokens.size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append(NameTokens);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(NameSurname);
+ ProcessData.Append(";");
+ ProcessData.Append(NameForename);
+ ProcessData.Append(";");
+ ProcessData.Append(NameOtherNames);
+ ProcessData.Append(";");
+ ProcessData.Append(NameTitle);
+ ProcessData.Append(";");
+ ProcessData.Append(NameSuffix);
+
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
// Process NICKNAME.
SaveNickname(&GeneralNicknamesList, &GeneralNicknamesListAltID,
&BusinessNicknamesListLanguage, &BusinessNicknamesListPref,
&BusinessNicknamesListTokens, SaveData, "work");
+ // Process GENDER.
+
+ if (Gender.size() > 0){
+
+ ProcessData.Append("GENDER");
+
+ if (GenderTokens.size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append(GenderTokens);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(Gender);
+
+ if (GenderDetails.size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append(GenderDetails);
+
+ }
+
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
+ // Process BDAY.
+
+ if (Birthday.size() > 0){
+
+ ProcessData.Append("BDAY");
+
+ // Check if there is a value for ALTID.
+
+ if (BirthdayAltID.size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append(BirthdayAltID);
+
+ }
+
+ // Check if there is a value for CALSCALE.
+
+ if (BirthdayAltID.size() > 0){
+
+ ProcessData.Append(";CALSCALE=");
+ ProcessData.Append(BirthdayCalScale);
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if (BirthdayTokens.size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append(BirthdayTokens);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(Birthday);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
+ // Process ANNIVERSARY.
+
+ if (Anniversary.size() > 0){
+
+ ProcessData.Append("ANNIVERSARY");
+
+ // Check if there is a value for ALTID.
+
+ if (AnniversaryAltID.size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append(AnniversaryAltID);
+
+ }
+
+ // Check if there is a value for CALSCALE.
+
+ if (AnniversaryAltID.size() > 0){
+
+ ProcessData.Append(";CALSCALE=");
+ ProcessData.Append(AnniversaryCalScale);
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if (AnniversaryTokens.size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append(AnniversaryTokens);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(Anniversary);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
// Process TITLE.
SaveTitle(&GeneralTitleList, &GeneralTitleListLanguage,