doc: add documentation for win fct helper
- add documentation for win fct helper - add new macro YYCC_U8_CHAR for casting ordinary char to yycc utf8 char. - add documentation for new added YYCC_U8_CHAR.
This commit is contained in:
@ -19,6 +19,7 @@ namespace YYCC::EncodingHelper {
|
||||
|
||||
#define _YYCC_U8(strl) u8 ## strl ///< The assistant macro for YYCC_U8.
|
||||
#define YYCC_U8(strl) (reinterpret_cast<const ::YYCC::yycc_char8_t*>(_YYCC_U8(strl))) ///< The macro for creating UTF8 string literal. See \ref library_encoding.
|
||||
#define YYCC_U8_CHAR(chr) (static_cast<YYCC::yycc_char8_t>(chr)) ///< The macro for casting normal char into YYCC UTF8 char type.
|
||||
|
||||
const yycc_char8_t* ToUTF8(const char* src);
|
||||
yycc_char8_t* ToUTF8(char* src);
|
||||
|
@ -3,23 +3,6 @@
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
/**
|
||||
* @brief The patch namespace resolving \c std::filesystem::path encoding issue.
|
||||
* @details
|
||||
* This patch is Windows oriented.
|
||||
* If you are in Windows, this patch will perform extra operations to achieve goals,
|
||||
* and in other platforms, they just redirect request to corresponding vanilla C++ functions.
|
||||
*
|
||||
* As you know, the underlying char type of \c std::filesystem::path is \c wchar_t on Windows,
|
||||
* and in other platforms, it is simple \c char.
|
||||
* Due to this, if you passing UTF8 char sequence to \c std::filesystem::path on Windows,
|
||||
* the library implementation will assume your input is based on current Windows code page, not UTF8.
|
||||
* And the final path stored in \c std::filesystem::path is not what you expcected.
|
||||
*
|
||||
* This patch namespace always use UTF8 as its argument. There is no ambiguous issue.
|
||||
* You should use the functions provided by this namespace on any platforms
|
||||
* instead of vanilla \c std::filesystem::path functions.
|
||||
*/
|
||||
namespace YYCC::FsPathPatch {
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user