From ef3d008020c592005a029a6df2951a67badecbd2 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Thu, 10 May 2007 21:10:07 +0000 Subject: [PATCH] Bug 260131. Handle UTF8 values properly --- CASA/CASA.changes | 5 +++++ CASA/micasad/cache/KeyValue.cs | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CASA/CASA.changes b/CASA/CASA.changes index 22f8eb87..79303a72 100644 --- a/CASA/CASA.changes +++ b/CASA/CASA.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 10 15:05:45 MDT 2007 - jnorman@novell.com + +- Bug 260131. Handle UTF8 values properly. + ------------------------------------------------------------------- Tue May 8 12:01:24 MDT 2007 - jnorman@novell.com diff --git a/CASA/micasad/cache/KeyValue.cs b/CASA/micasad/cache/KeyValue.cs index 55294d64..ed0e40de 100644 --- a/CASA/micasad/cache/KeyValue.cs +++ b/CASA/micasad/cache/KeyValue.cs @@ -192,7 +192,7 @@ namespace sscs.cache private byte[] EncryptValue(string sValue) { - byte[] baValueClear = Encoding.Default.GetBytes(sValue); + byte[] baValueClear = Encoding.Unicode.GetBytes(sValue); return EncryptValue(baValueClear); } @@ -205,8 +205,9 @@ namespace sscs.cache private string DecryptValue() { - byte[] baValueClear = DecyptValueAsBytes(); - return Encoding.Default.GetString(baValueClear); + byte[] baValueClear = DecyptValueAsBytes(); + return Encoding.Unicode.GetString(baValueClear); +// return Encoding.Default.GetString(baValueClear); //return Encoding.Default.GetString(baValueClear); }