OData / odataorg.github.io

Staging site and collaboration repository for http://www.odata.org
MIT License
63 stars 101 forks source link

diacritics character #168

Open sevvandhiNagulan opened 5 years ago

sevvandhiNagulan commented 5 years ago

Can you please tell me Odata service support for diacritics character while searching?

nicenemo commented 5 years ago

This largely depends on the implementation of

  1. The OData service layer(.e.g. .NET or Java(Olingo) or something else.
  2. The backend system that gets exposed via OData. E.g. Is the Database using the correct code page.
  3. The unicode support of the underlying environments.

My personal experience and testing

I worked on both Java and Based OData services and the problem was never with OData but sometimes there are bugs in backendSystems. I 2015 some older Sharepoint based systems could realy crash hard on 'y' with an umlaut/trema (double dots): ÿ.

Olingo can handle Indian scripts, Chinese(classic and simplified),Russian,Greek, Hebrew, Arbabic, Georgean,Korean and more. It even supports Egyptian hieroglyphs and Mayan. I wrote tests for that.

However it may not support the latest emoji because that is not in the String/Character implementation of the underlying Java code and JVM virtual machine. I guess the same is true for .NET but I did not test that as thoroughly. Although I am sure it understands European scripts with diacritics because I tested that. Both tested on Olingo 4.0 and .NET implementations of OData 4.0)

Testing character set support

If you want to be sure, write integration and unit tests for it. I suggest to use some property based testing framework for the programming language you use. e.g.:

Unicode support in your runtime

You can also cook something up yourself that is less sophisticated. In that case start from the unicode code points, NOT the strings or characters. Test first if your language/library/runtime String and Character classes support what you need. In Java use int not char. Have a look at the Character class and it's subclasses.