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
{{ message }}
Repository navigation
Commit 95fa1cf
Browse filesBrowse the repository at this point in the historyBrowse files
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
74
-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
The test binary exits with code `0` on full pass, `1` on any failure.
@@ -637,6 +659,41 @@ The test binary exits with code `0` on full pass, `1` on any failure.
637
659
638
660
## Changelog
639
661
662
+
### v1.1.2 — Added multiple enconding support
663
+
664
+
Included multiple text enconding support for a wide range of encondings. Updated unit tests for the new text enconding functionality.
665
+
666
+
#### `src/xml_parser.cpp` — Added a complete encoding transcoding layer before the XML parser:
667
+
668
+
`extract_xml_encoding_decl()` — scans the XML prolog for encoding="..."
669
+
670
+
`detect_encoding()` — BOM detection (UTF-8/16/32 LE/BE) takes precedence, falls back to the XML declaration
671
+
672
+
`utf16_to_utf8()` / `utf32_to_utf8()` — built-in converters (no platform dependency) with correct surrogate-pair handling
673
+
674
+
**Windows path:**`win_mbcs_to_utf8()` via `MultiByteToWideChar` + `WideCharToMultiByte`; maps 60+ encoding names to Windows codepage numbers (all Windows-125x, ISO-8859-1..16, Asian, Cyrillic, Thai, OEM codepages)
675
+
676
+
**Linux/macOS path:**`iconv_convert()` via `iconv(3)` with the same name alias table; handles `E2BIG`/`EILSEQ`/`EINVAL` gracefully
677
+
`transcode_to_utf8()` — public entry point, called at the start of `sax_parse()` so all parsing paths (DOM and SAX) go through it automatically
678
+
679
+
#### `include/xml_parser.h` — Exposed transcode_to_utf8() as a public API with full docstring.
680
+
681
+
#### `CMakeLists.txt` — Added `find_package(Iconv QUIET)` for non-Windows targets; links `Iconv::Iconv` only when it's a separate library (not built into libc).
0 commit comments