From 79bd149b12feabeacfdc3aaa9729b9db35fd51a1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 21 May 2020 14:08:16 -0700 Subject: [PATCH] Handle non breaking white spaces in copy paste manager (#1226) * Handle non breaking white spaces in copy paste manager * handle other group characters --- src/CalcViewModel/Common/CopyPasteManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CalcViewModel/Common/CopyPasteManager.cpp b/src/CalcViewModel/Common/CopyPasteManager.cpp index ade3a3f..dbcded5 100644 --- a/src/CalcViewModel/Common/CopyPasteManager.cpp +++ b/src/CalcViewModel/Common/CopyPasteManager.cpp @@ -594,9 +594,11 @@ ULONG32 CopyPasteManager::ProgrammerOperandLength(Platform::String ^ operand, Nu // Indian rupee(₹) - 8377 // pound(£) - 163 // euro(€) - 8364 +// non-breaking whitespace - 160 Platform::String ^ CopyPasteManager::RemoveUnwantedCharsFromString(Platform::String ^ input) { - constexpr wchar_t unWantedChars[] = { L' ', L',', L'"', 165, 164, 8373, 36, 8353, 8361, 8362, 8358, 8377, 163, 8364, 8234, 8235, 8236, 8237 }; + constexpr wchar_t unWantedChars[] = { L' ', L',', L'"', 165, 164, 8373, 36, 8353, 8361, 8362, 8358, 8377, 163, 8364, 8234, 8235, 8236, 8237, 160 }; + input = CalculatorApp::Common::LocalizationSettings::GetInstance().RemoveGroupSeparators(input); return ref new String(Utils::RemoveUnwantedCharsFromString(input->Data(), unWantedChars).c_str()); }