| Age | Commit message (Collapse) | Author |
|
|
|
Continues the migration of our code over to the fmt logger.
|
|
CommandLineParse expects UTF-8 strings. (QApplication, on the
other hand, seems to be designed so that you can pass in the
char** argv untouched on Windows and get proper Unicode handling.)
|
|
Android: Use correct encoding when converting strings
|
|
Ridiculously long nicknames cause UI silliness, so 30 characters seems
like a reasonable limit, as it's the same as the forum.
|
|
The functions with "UTF" in the name use "modified UTF-8" rather
than the standard UTF-8 which Dolphin uses, at least according
to Oracle's documentation, so it is incorrect for us to use them.
This change fixes the problem by converting between UTF-8 and
UTF-16 manually instead of letting JNI do it for us.
|
|
Probably not something we would run into in practice since
Windows uses a separate implementation, but let's do it
for the sake of correctness.
|
|
This function does *not* always convert from UTF-16. It converts
from UTF-16 on Windows and UTF-32 on other operating systems.
Also renaming UTF8ToUTF16 for consistency, even though it
technically doesn't have the same problem since it only was
implemented on Windows.
|
|
|
|
|
|
Add a function that safely returns whether a character is printable
i.e. whether 0x20 <= c <= 0x7e is true.
This is done in several places in our codebase and it's easy to run
into undefined behaviour if the C version defined in <cctype>
is used instead of this one, since its behaviour is undefined
if the character is not representable as an unsigned char.
This fixes MemoryViewWidget.
|
|
|
|
where possible.
This removes std::iostream from the inheritance chain, which reduces
overhead slightly.
|
|
|
|
|
|
|
|
|
|
Begins the transition to using fmt for string formatting where
applicable. Given fmt supports formatting std::string instances out of
the box, we can remove now-unnecessary calls to .c_str() and .data().
Note that this change does not touch the actual logging subsystem aside
from converting the final StringFromFormat call in the process over to
fmt::format. Given our logging system is heavily used throughout the
entire codebase, and converting that over will be quite a large change
by itself, this will be tackled near the end of the conversion process.
|
|
|
|
|
|
Doesn't make a lot of sense to have a function that gives the string
representation for a string.
|
|
An identical implementation is used by IniFile, so move those functions
to StringUtil. A future commit will modify IniFile to use them.
|
|
|
|
|
|
codecvt_utf8<wchar_t> to convert a UTF16 wstring to a UTF8 string.
|
|
std::u16string, and pass it into CodeToUTF8 with the 'from' parameter being "UTF-16BE", rather than manually performing the big endian to little endian encoding.
|
|
UTF16BEToUTR8 method.
|
|
|
|
No code is relying on this unexplained null byte check, since
the only code that calls UTF16ToUTF8 on non-Windows systems
is UTF16BEToUTF8, which explicitly strips null bytes.
|
|
The earlier code always tried to use TitleDatabase for getting
title names, but that didn't work for disc-based games, because
there was no way to get the maker ID.
|
|
This class is similar to the BannerLoaderWii class that was
removed in ee694e32.
|
|
|
|
Updated version of #47. Android should support to_string now that
we use a modern version of libc++ when building.
|
|
Simpler usage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Prevents path traversal without needing an absolute path
function, and also improves accuracy (character sequences
like ../ appear to have no special meaning in IOS).
This removes the creation and usage of /sys/replace,
because the new escapes are too complicated to all
be representable in its format and because no other
NAND handling software seems to use /sys/replace.
|
|
|
|
This is needed to keep compatibility with old configuration files which
didn't store booleans as booleans, but as floats/doubles.
|
|
|
|
|
|
Generates a string like the following from a binary blob:
000000: 00 00 04 74 79 70 65 00 09 61 70 70 2d 73 74 61 ...type..app-sta
000010: 72 74 rt
|
|
|
|
|
|
not the variable name
|