You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are also problems with BOMs. There are should be API for taking them into account in UTF-16 and other formats that are affected by BOM. Sometimes, I even encounter them in UTF-8 encoded files too (which is allowed, but not recommended by the Unicode standard). In this case, BOM should be stripped out whenever possible.
Regarding the UTF-8 with BOM issue, I think that it should be the koltinx-io responsibly.
To what API are you referring as needing BOM support?
BOMs are a document-level concept and much of this library deals with arbitrary bytes that could come from database rows, HTTP/2 frames, files, and many more. You don't want to be checking for BOMs any time strings are requested, but if you have an API that goes directly from document to string they can be queried.
There were some thoughts regarding supporting encodings other than UTF-8, but currently, there are no particular plans on when and how it'll be supported.
Could you please clarify what kind of UTF-8 BOMs support you're expecting from the kotlinx-io?
As Jake wrote, BOMs are a document-level concept, so we can't simply skip BOM-alike prefix on every readString call.
Different encoding formats
Although UTF-8 is quite popular these days, the sad reality is that sometimes we need to handle other encodings (UTF-16, windows-1251, etc.).
See also:
Handling of byte order mark (BOM)
There are also problems with BOMs. There are should be API for taking them into account in UTF-16 and other formats that are affected by BOM. Sometimes, I even encounter them in UTF-8 encoded files too (which is allowed, but not recommended by the Unicode standard). In this case, BOM should be stripped out whenever possible.
Regarding the UTF-8 with BOM issue, I think that it should be the
koltinx-io
responsibly.See also:
Related discussions:
The text was updated successfully, but these errors were encountered: