From fefef83a32f68f1a8cfe23ab864fd9e803ee92c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Kirchh=C3=B6fer?= Date: Tue, 7 Jan 2025 15:31:13 +0100 Subject: [PATCH] =?UTF-8?q?Encoding=20in=20UTF8=20(ohne=20-BOM)=20Ge=C3=A4?= =?UTF-8?q?ndert.=20System.Text.Encoding.UTF8=20ist=20standardm=C3=A4?= =?UTF-8?q?=C3=9Fig=20mit=20-BOM,=20was=20beim=20Import=20in=20Android-Han?= =?UTF-8?q?dys=20Probleme=20machte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FWCreateCalendar/frmMain.vb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/FWCreateCalendar/frmMain.vb b/FWCreateCalendar/frmMain.vb index 5df7417..186fe99 100644 --- a/FWCreateCalendar/frmMain.vb +++ b/FWCreateCalendar/frmMain.vb @@ -273,8 +273,6 @@ Public Class frmMain Private Sub IcalNetTest(OutputFile As String) Dim calendar As New Ical.Net.Calendar - 'calendar.AddTimeZone(New Ical.Net.CalendarComponents.VTimeZone("Europe/Berlin")) - 'calendar.AddTimeZone(New Ical.Net.CalendarComponents.VTimeZone(General.Settings.DefaultTimezoneId)) For Each evt As EventEntry In ds.Where(Function(e) e.IsInvalid = False AndAlso e.Exclude = False) calendar.Events.Add(New Ical.Net.CalendarComponents.CalendarEvent With { .Start = New CalDateTime(evt.StartDate), @@ -286,7 +284,8 @@ Public Class frmMain Next Dim serializer As New CalendarSerializer - Using sw As New StreamWriter(OutputFile, False, System.Text.Encoding.UTF8) + Dim utf8WithoutBom As New System.Text.UTF8Encoding(False) + Using sw As New StreamWriter(OutputFile, False, utf8WithoutBom) 'NICHT einfach System.Text.Encoding.UTF8 nehmen, da dann als UTF8-BOM gespeichert wird und der Import z.B. Bei Samsung/Android-Handys nicht funktioniert sw.Write(serializer.SerializeToString(calendar)) End Using @@ -324,4 +323,8 @@ Public Class frmMain xlsSheet.SelectedCell = activeSheet.Cells($"A{grdv.GetFocusedRowCellValue("RowIndex")}") activeSheet.ScrollTo(activeSheet.SelectedCell) End Sub + + Private Sub FluentDesignFormControl1_Click(sender As Object, e As EventArgs) Handles FluentDesignFormControl1.Click + + End Sub End Class \ No newline at end of file