pw_tokenizer: Specify UTF-8 encoding when reading databases The default encoding for opening a file is platform-dependent. Tokenizer expects UTF-8, but that was only specified for CSV databases, not directory databases. This causes problems when opening databases that use non-ASCII characters on Windows. Consolidate code paths for opening CSV and directory databases so that UTF-8 is always used. Also, specify UTF-8 when opening JSON databases. Change-Id: I56ac7e6722b5eda1cd3351798aec4e952d852b56 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/130473 Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Reviewed-by: Keir Mierle <keir@google.com> Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: William Abajian <williamabajian@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.