mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Adjust memorized numbers encoding
This commit is contained in:
parent
09b9016d3d
commit
0e02698fce
1 changed files with 3 additions and 1 deletions
|
@ -157,7 +157,9 @@ namespace CalculationManager
|
|||
var numbers = new List<String>();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
numbers.Add(Marshal.PtrToStringUTF8(Marshal.ReadIntPtr(newMemorizedNumbers, i)));
|
||||
// TODO Use native encoding instead.
|
||||
var value = Marshal.PtrToStringAnsi(Marshal.ReadIntPtr(newMemorizedNumbers, i));
|
||||
numbers.Add(Encoding.UTF8.GetString(Encoding.ASCII.GetBytes(value)));
|
||||
}
|
||||
|
||||
manager.SetMemorizedNumbers(numbers);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue