From afab6f2eb3b1e42ab8e05e838f208cc04009509c Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Fri, 24 Apr 2026 04:50:46 +0000
Subject: [PATCH 1/2] fix: change HTTP response default encoding from
ISO-8859-1 to UTF-8 (Closes #1251)
ResponseDefaultEncoding now defaults to UTF-8, matching System.Net.Http.HttpClient
behaviour. RFC 2616 specified ISO-8859-1 but modern servers and browsers default to
UTF-8; the old default caused garbled output when fetching UTF-8 content without an
explicit charset in the Content-Type response header.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
RELEASE_NOTES.md | 4 ++++
src/FSharp.Data.DesignTime/Csv/CsvProvider.fs | 2 +-
src/FSharp.Data.DesignTime/Html/HtmlProvider.fs | 2 +-
src/FSharp.Data.DesignTime/Json/JsonProvider.fs | 2 +-
src/FSharp.Data.DesignTime/Xml/XmlProvider.fs | 2 +-
src/FSharp.Data.Http/Http.fs | 4 ++--
tests/FSharp.Data.Core.Tests/HttpEncodings.fs | 4 ++--
7 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 41a94ebb0..4eacd36b5 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,5 +1,9 @@
# Release Notes
+## 8.1.12 - Apr 24 2026
+
+- Fix: `HttpEncodings.ResponseDefaultEncoding` now defaults to UTF-8 instead of ISO-8859-1, matching `System.Net.Http.HttpClient` behaviour. RFC 2616 specified ISO-8859-1 but modern servers and browsers default to UTF-8; the old default caused garbled output when fetching UTF-8 content without an explicit `charset` (Closes #1251)
+
## 8.1.11 - Apr 22 2026
- Code: `HtmlParser` `EmitTag` removes dead code in the `else` branch (the expression `x.HasFormattedParent || x.IsFormattedTag` was always equivalent to `x.HasFormattedParent` since `x.IsFormattedTag` is always `false` in that branch). Uses `name` directly to avoid re-computing `CurrentTagName()` for formatted/script tag checks. Also removes redundant `.ToLowerInvariant()` calls in `IsFormattedTag` and `IsScriptTag` since tag names are already lowercased at read time.
diff --git a/src/FSharp.Data.DesignTime/Csv/CsvProvider.fs b/src/FSharp.Data.DesignTime/Csv/CsvProvider.fs
index b78c65525..e464ffe4a 100644
--- a/src/FSharp.Data.DesignTime/Csv/CsvProvider.fs
+++ b/src/FSharp.Data.DesignTime/Csv/CsvProvider.fs
@@ -273,7 +273,7 @@ type public CsvProvider(cfg: TypeProviderConfig) as this =
+ """.
Whether the rows should be caches so they can be iterated multiple times. Defaults to true. Disable for large datasets.
The culture used for parsing numbers and dates. Defaults to the invariant culture.
- The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and to ISO-8859-1 the for HTTP requests, unless charset is specified in the Content-Type response header.
+ The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and for HTTP requests when no charset is specified in the Content-Type response header.
A directory that is used when resolving relative file references (at design time and in hosted execution).
When specified, the type provider first attempts to load the sample from the specified resource
(e.g. 'MyCompany.MyAssembly, resource_name.csv'). This is useful when exposing types generated by the type provider.
diff --git a/src/FSharp.Data.DesignTime/Html/HtmlProvider.fs b/src/FSharp.Data.DesignTime/Html/HtmlProvider.fs
index bedb1a34b..4c59362d8 100644
--- a/src/FSharp.Data.DesignTime/Html/HtmlProvider.fs
+++ b/src/FSharp.Data.DesignTime/Html/HtmlProvider.fs
@@ -111,7 +111,7 @@ type public HtmlProvider(cfg: TypeProviderConfig) as this =
+ String.Join(",", TextConversions.DefaultMissingValues)
+ """.
The culture used for parsing numbers and dates. Defaults to the invariant culture.
- The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and to ISO-8859-1 the for HTTP requests, unless charset is specified in the Content-Type response header.
+ The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and for HTTP requests when no charset is specified in the Content-Type response header.
A directory that is used when resolving relative file references (at design time and in hosted execution).
When specified, the type provider first attempts to load the sample from the specified resource
(e.g. 'MyCompany.MyAssembly, resource_name.html'). This is useful when exposing types generated by the type provider.
diff --git a/src/FSharp.Data.DesignTime/Json/JsonProvider.fs b/src/FSharp.Data.DesignTime/Json/JsonProvider.fs
index 5c46790b2..663afa676 100644
--- a/src/FSharp.Data.DesignTime/Json/JsonProvider.fs
+++ b/src/FSharp.Data.DesignTime/Json/JsonProvider.fs
@@ -198,7 +198,7 @@ type public JsonProvider(cfg: TypeProviderConfig) as this =
If true, sample should be a list of individual samples for the inference.
The name to be used to the root type. Defaults to `Root`.
The culture used for parsing numbers and dates. Defaults to the invariant culture.
- The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and to ISO-8859-1 the for HTTP requests, unless `charset` is specified in the `Content-Type` response header.
+ The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and for HTTP requests when no `charset` is specified in the `Content-Type` response header.
A directory that is used when resolving relative file references (at design time and in hosted execution).
When specified, the type provider first attempts to load the sample from the specified resource
(e.g. 'MyCompany.MyAssembly, resource_name.json'). This is useful when exposing types generated by the type provider.
diff --git a/src/FSharp.Data.DesignTime/Xml/XmlProvider.fs b/src/FSharp.Data.DesignTime/Xml/XmlProvider.fs
index 58d65196b..fb2891afa 100644
--- a/src/FSharp.Data.DesignTime/Xml/XmlProvider.fs
+++ b/src/FSharp.Data.DesignTime/Xml/XmlProvider.fs
@@ -238,7 +238,7 @@ type public XmlProvider(cfg: TypeProviderConfig) as this =
If true, the children of the root in the sample document represent individual samples for the inference.
If true, the inference unifies all XML elements with the same name.
The culture used for parsing numbers and dates. Defaults to the invariant culture.
- The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and to ISO-8859-1 the for HTTP requests, unless charset is specified in the Content-Type response header.
+ The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and for HTTP requests when no charset is specified in the Content-Type response header.
A directory that is used when resolving relative file references (at design time and in hosted execution).
When specified, the type provider first attempts to load the sample from the specified resource
(e.g. 'MyCompany.MyAssembly, resource_name.xml'). This is useful when exposing types generated by the type provider.
diff --git a/src/FSharp.Data.Http/Http.fs b/src/FSharp.Data.Http/Http.fs
index 10056cbaf..75a60fb8a 100644
--- a/src/FSharp.Data.Http/Http.fs
+++ b/src/FSharp.Data.Http/Http.fs
@@ -1376,8 +1376,8 @@ module HttpEncodings =
/// ISO-8859-1
let PostDefaultEncoding = Encoding.GetEncoding("ISO-8859-1") // http://stackoverflow.com/questions/708915/detecting-the-character-encoding-of-an-http-post-request/708942#708942
- /// ISO-8859-1
- let ResponseDefaultEncoding = Encoding.GetEncoding("ISO-8859-1") // http://www.ietf.org/rfc/rfc2616.txt
+ /// UTF-8 (matches System.Net.Http.HttpClient default behaviour; RFC 2616 specifies ISO-8859-1 but modern servers and browsers default to UTF-8)
+ let ResponseDefaultEncoding = Encoding.UTF8
let internal getEncoding (encodingStr: string) =
match Int32.TryParse(encodingStr, NumberStyles.Integer, CultureInfo.InvariantCulture) with
diff --git a/tests/FSharp.Data.Core.Tests/HttpEncodings.fs b/tests/FSharp.Data.Core.Tests/HttpEncodings.fs
index 5aaba8721..b2a3ee869 100644
--- a/tests/FSharp.Data.Core.Tests/HttpEncodings.fs
+++ b/tests/FSharp.Data.Core.Tests/HttpEncodings.fs
@@ -10,8 +10,8 @@ let ``HttpEncodings.PostDefaultEncoding returns ISO-8859-1`` () =
HttpEncodings.PostDefaultEncoding.WebName |> should equal "iso-8859-1"
[]
-let ``HttpEncodings.ResponseDefaultEncoding returns ISO-8859-1`` () =
- HttpEncodings.ResponseDefaultEncoding.WebName |> should equal "iso-8859-1"
+let ``HttpEncodings.ResponseDefaultEncoding returns UTF-8`` () =
+ HttpEncodings.ResponseDefaultEncoding.WebName |> should equal "utf-8"
[]
let ``HttpEncodings.getEncoding with valid encoding name works`` () =
From ab2c2479f03d7ea3c6819c089d289a5070a5bf16 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Fri, 24 Apr 2026 04:50:47 +0000
Subject: [PATCH 2/2] chore: bump version to 8.1.12 in AssemblyInfo files
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
src/AssemblyInfo.Csv.Core.fs | 8 ++++----
src/AssemblyInfo.DesignTime.fs | 8 ++++----
src/AssemblyInfo.Html.Core.fs | 8 ++++----
src/AssemblyInfo.Http.fs | 8 ++++----
src/AssemblyInfo.Json.Core.fs | 8 ++++----
src/AssemblyInfo.Runtime.Utilities.fs | 8 ++++----
src/AssemblyInfo.WorldBank.Core.fs | 8 ++++----
src/AssemblyInfo.Xml.Core.fs | 8 ++++----
src/AssemblyInfo.fs | 8 ++++----
9 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/AssemblyInfo.Csv.Core.fs b/src/AssemblyInfo.Csv.Core.fs
index 704088dd6..dbf199c42 100644
--- a/src/AssemblyInfo.Csv.Core.fs
+++ b/src/AssemblyInfo.Csv.Core.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data.Csv.Core"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"
diff --git a/src/AssemblyInfo.DesignTime.fs b/src/AssemblyInfo.DesignTime.fs
index a6ab68697..6b94574b6 100644
--- a/src/AssemblyInfo.DesignTime.fs
+++ b/src/AssemblyInfo.DesignTime.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data.DesignTime"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"
diff --git a/src/AssemblyInfo.Html.Core.fs b/src/AssemblyInfo.Html.Core.fs
index 8b96c5f2d..e7c528904 100644
--- a/src/AssemblyInfo.Html.Core.fs
+++ b/src/AssemblyInfo.Html.Core.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data.Html.Core"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"
diff --git a/src/AssemblyInfo.Http.fs b/src/AssemblyInfo.Http.fs
index edb61ddbc..a524265e2 100644
--- a/src/AssemblyInfo.Http.fs
+++ b/src/AssemblyInfo.Http.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data.Http"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"
diff --git a/src/AssemblyInfo.Json.Core.fs b/src/AssemblyInfo.Json.Core.fs
index 57595f3e0..9cabd3c8b 100644
--- a/src/AssemblyInfo.Json.Core.fs
+++ b/src/AssemblyInfo.Json.Core.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data.Json.Core"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"
diff --git a/src/AssemblyInfo.Runtime.Utilities.fs b/src/AssemblyInfo.Runtime.Utilities.fs
index 3707ecf0b..f3fb3e594 100644
--- a/src/AssemblyInfo.Runtime.Utilities.fs
+++ b/src/AssemblyInfo.Runtime.Utilities.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data.Runtime.Utilities"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"
diff --git a/src/AssemblyInfo.WorldBank.Core.fs b/src/AssemblyInfo.WorldBank.Core.fs
index 38c89b67a..0b8c5e65d 100644
--- a/src/AssemblyInfo.WorldBank.Core.fs
+++ b/src/AssemblyInfo.WorldBank.Core.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data.WorldBank.Core"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"
diff --git a/src/AssemblyInfo.Xml.Core.fs b/src/AssemblyInfo.Xml.Core.fs
index 02059831f..1096ac67b 100644
--- a/src/AssemblyInfo.Xml.Core.fs
+++ b/src/AssemblyInfo.Xml.Core.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data.Xml.Core"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"
diff --git a/src/AssemblyInfo.fs b/src/AssemblyInfo.fs
index 56513e4c2..b3a076164 100644
--- a/src/AssemblyInfo.fs
+++ b/src/AssemblyInfo.fs
@@ -5,13 +5,13 @@ open System.Reflection
[]
[]
[]
-[]
-[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
let [] AssemblyTitle = "FSharp.Data"
let [] AssemblyProduct = "FSharp.Data"
let [] AssemblyDescription = "Library of F# type providers and data access tools"
- let [] AssemblyVersion = "8.1.11.0"
- let [] AssemblyFileVersion = "8.1.11.0"
+ let [] AssemblyVersion = "8.1.12.0"
+ let [] AssemblyFileVersion = "8.1.12.0"