commit ba2d1eb1845dfcd9c6efd579dcaa72ed9579114d
parent a0f30cc86fe8f868dfc4b638a13a19dd42fef035
Author: Sweet Liquid <himejisyana@hotmail.com>
Date: Wed, 24 Jun 2020 01:42:30 +0800
Save some file with encoding UTF-8 (with BOM) (#447)
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/AppInstallerCLICore/TableOutput.h b/src/AppInstallerCLICore/TableOutput.h
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation.
+// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#pragma once
#include "ExecutionReporter.h"
@@ -192,7 +192,7 @@ namespace AppInstaller::CLI::Execution
if (valueLength > col.MaxLength)
{
out << Utility::UTF8Substring(line[i], 0, col.MaxLength - 1);
- out << "\xE2\x80\xA6"; // UTF8 encoding of ellipsis (…) character
+ out << "\xE2\x80\xA6"; // UTF8 encoding of ellipsis (…) character
if (col.SpaceAfter)
{
diff --git a/src/AppInstallerCLITests/Strings.cpp b/src/AppInstallerCLITests/Strings.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation.
+// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "pch.h"
#include "TestCommon.h"
@@ -12,8 +12,8 @@ TEST_CASE("UTF8Length", "[strings]")
REQUIRE(UTF8Length("") == 0);
REQUIRE(UTF8Length("a") == 1);
REQUIRE(UTF8Length(" a b c ") == 7);
- REQUIRE(UTF8Length("K\xC3\xA4se") == 4); // "Käse"
- REQUIRE(UTF8Length("bye\xE2\x80\xA6") == 4); // "bye…"
+ REQUIRE(UTF8Length("K\xC3\xA4se") == 4); // "Käse"
+ REQUIRE(UTF8Length("bye\xE2\x80\xA6") == 4); // "bye…"
REQUIRE(UTF8Length("\xf0\x9f\xa6\x86") == 1); // [duck emoji]
REQUIRE(UTF8Length("\xf0\x9d\x85\xa0\xf0\x9d\x85\xa0") == 2); // [8th note][8th note]
}