Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorelfmz <fenix1905@tut.by>2022-01-31 01:46:18 +0300
committerelfmz <fenix1905@tut.by>2022-01-31 01:46:22 +0300
commit089410f741a4de324be01424dcb3737585fc6405 (patch)
tree93a767a274298a9416f0b78c190cdb24c75c373b /utils
parent275ba1baff8616f4fddd4f5e3876e00bf19208c3 (diff)
NetRocks: add codepages selection (close #1198)
Diffstat (limited to 'utils')
-rw-r--r--utils/include/UtfConvert.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/include/UtfConvert.hpp b/utils/include/UtfConvert.hpp
index 8af2d406..a1ce4af9 100644
--- a/utils/include/UtfConvert.hpp
+++ b/utils/include/UtfConvert.hpp
@@ -136,6 +136,13 @@ template <typename CHAR_SRC, typename PUSHBACK_DST>
return out;
}
+template <typename CHAR_SRC, typename DST>
+ static inline unsigned UtfConvertStd(const CHAR_SRC *src_begin, size_t &src_len, DST &dst, bool fail_on_illformed)
+{
+ StdPushBack<DST> dst_pb(dst);
+ return UtfConvert(src_begin, src_len, dst_pb, fail_on_illformed);
+}
+
template <typename CHAR_SRC, typename CHAR_DST>
static inline size_t UtfCalcSpace(const CHAR_SRC *src_begin, size_t src_len, bool fail_on_illformed)