QueryCache CJK language not supported.

Description

from NHibernate.Caches.<AnyCacheProvider>.<AnyCacheClient>

ComputeHash function using Encoding.ASCII.GetBytes.

Encoding.ASCII.GetBytes can't encoding CJK language.
QueryCache Use SQL string key. SQL where clauses contains CJK language.

// Korean
Console.WriteLine(Convert.ToBase64String(Encoding.ASCII.GetBytes("길동"))); // Pz8=
Console.WriteLine(Convert.ToBase64String(Encoding.ASCII.GetBytes("최고"))); // Pz8=

// Chinese
Console.WriteLine(Convert.ToBase64String(Encoding.ASCII.GetBytes("新闻"))); // Pz8=
Console.WriteLine(Convert.ToBase64String(Encoding.ASCII.GetBytes("地图"))); // Pz8=

// Japanese
Console.WriteLine(Convert.ToBase64String(Encoding.ASCII.GetBytes("ます"))); // Pz8=
Console.WriteLine(Convert.ToBase64String(Encoding.ASCII.GetBytes("プル"))); // Pz8=

Unicode or UTF8 like a good idea to use.

Environment

None

Activity

Show:
Frédéric Delaporte
October 20, 2017, 11:20 AM

NHibernate.Caches code does not contain any GetBytes. Maybe this is an obsolete issue. Otherwise can you pinpoint the troublesome code in current sources?

NHibernate, NHibernate.Caches.

Frédéric Delaporte
October 20, 2017, 11:32 AM

I have messed up not seing a bad search option...

Assignee

Frédéric Delaporte

Reporter

Chanhee Jeong

Labels

Components

Fix versions

Affects versions

Priority

Minor
Configure