mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-30 11:21:01 +00:00
Use UTF-8 everywhere possible and only use wchar_t where required.
* This means that all APIs pass byte string types. ALL strings everywhere in the entire codebase must be assumed to be and treated as UTF-8 content not ASCII. * Gets rid of all the horrible %hs specifiers that caused warnings on linux! Hooray. * We convert to wide strings, or use wide characters, only when necessary to use the Win32 API. Some windows specific code will stay in wide chars just for convenience. * Files are already serialised as UTF-8 strings for linux/windows binary compatibility, so this change doesn't break backwards compatibility.
This commit is contained in:
@@ -884,7 +884,7 @@ void formatargument(char type, void *rawarg, FormatterParams formatter, char *&o
|
||||
len = RDCMIN(len, precision);
|
||||
|
||||
// convert the substring to UTF-8
|
||||
string str = StringFormat::Wide2UTF8(wstring(ws, ws + len));
|
||||
string str = StringFormat::Wide2UTF8(std::wstring(ws, ws + len));
|
||||
|
||||
// add left padding, if necessary
|
||||
if(formatter.Width != FormatterParams::NoWidth && len < width && !(formatter.Flags&LeftJustify))
|
||||
|
||||
Reference in New Issue
Block a user