select *from urunler where musteri like %ir%;
テストデータ:
+---musteri---+---ID--+
+-------------+-------+
+---İrem------+---1---+
+---Kadir-----+---2---+
+---Demir-----+---3---+
返される結果:
Kadir
Demir
使用する%İr%
と、イレムは戻ってきますが、カディールとデミールは戻ってきません。他のトルコ語の文字にも同じ問題がありますが、正確な解決策はありません。私はモノアンドロイドをプログラミングしています。
[SQLiteFunction(Name = "TOUPPER", Arguments = 1, FuncType = FunctionType.Scalar)]
public class TOUPPER: SQLiteFunction
{
public override object Invoke(object[] args)
{
return args[0].ToString().ToUpper();
}
}
[SQLiteFunction(Name = "COLLATION_CASE_INSENSITIVE", FuncType = FunctionType.Collation)]
class CollationCaseInsensitive : SQLiteFunction {
public override int Compare(string param1, string param2) {
return String.Compare(param1, param2, true);
}
}
TOUPPER.RegisterFunction(typeof(TOUPPER));
この方法で解決しましたが、mono c# 'ライブラリを使用して、ここで Android.Database.Sqlite.SQLiteDatabase を実行する必要があります