coreaudio-encoder: Use byte sequence for non-breaking spaces

Use explicit UTF-8 byte sequence for the "no-break space" character.

Prevents issues with certain editors, and fixes the following compiler
warning on Visual C++:

warning C4819: The file contains a character that cannot be represented
in the current code page (X). Save the file in Unicode format to prevent
data loss
This commit is contained in:
jp9000
2015-10-15 01:26:53 -07:00
parent 1bcbaf8e75
commit 6ba5e31d05

View File

@@ -1200,6 +1200,8 @@ static void add_samplerates(obs_property_t *prop, ca_encoder *ca)
}
}
#define NBSP "\xC2\xA0"
static vector<UInt32> get_bitrates(DStr &log, ca_encoder *ca,
Float64 samplerate)
{
@@ -1233,7 +1235,7 @@ static vector<UInt32> get_bitrates(DStr &log, ca_encoder *ca,
};
for (UInt32 format_id : (ca ? *ca->allowed_formats : aac_formats)) {
log_to_dstr(log, ca, "Trying %s (0x%x) at %g hz\n",
log_to_dstr(log, ca, "Trying %s (0x%x) at %g" NBSP "hz\n",
format_id_to_str(format_id),
static_cast<uint32_t>(format_id),
samplerate);