Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9006887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:31:53+00:00 2026-06-16T01:31:53+00:00

In our UItableView search, we are using the below code to search a typed

  • 0

In our UItableView search, we are using the below code to search a typed text in the cell content

NSComparisonResult result = [eachCellContent compare:searchText options:NSDiacriticInsensitiveSearch|NSCaseInsensitiveSearch range:NSMakeRange(0, [searchText length])];

This is working fine. But this is not working with korean text.

E.g:
suppose one of the cell text is “소”.//we are getting this combination by typing these two letters ㅅ and ㅗ
If we type ㅅ only , our compare method is not working and so not listing the “소”. (it is working if we type both ㅅ and ㅗ)

But the above example is working well with AddressBook application.

Is there any other compare method to support this ? (we also need this NSDiacriticInsensitiveSearch|NSCaseInsensitiveSearch )

Thanks to reading.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:31:54+00:00Added an answer on June 16, 2026 at 1:31 am

    You could try to normalize the strings using

    NSString *normalizedContent = [eachCellContent decomposedStringWithCanonicalMapping];
    NSString *normalizedSearch = [searchText decomposedStringWithCanonicalMapping];
    

    and then compare these.


    UPDATE: The following algorithm worked in my test project:

    NSString *eachCellContent = @"소";
    NSString *searchText = @"ㅅ";
    
    NSString *normalizedContent = [eachCellContent decomposedStringWithCanonicalMapping];
    NSString *normalizedSearch = [searchText decomposedStringWithCanonicalMapping];
    
    NSComparisonResult result = [normalizedContent compare:normalizedSearch
                                                   options:NSDiacriticInsensitiveSearch|NSCaseInsensitiveSearch
                                                     range:NSMakeRange(0, [normalizedSearch length])
                                                    locale:[NSLocale currentLocale]];
    if (result == NSOrderedSame) {
        NSLog(@"same");
    }
    // Output: same
    

    In addition to decomposing the Unicode characters, the “trick” was to use a localized comparison.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a UiTableView in our application.We have two tabs in controller one
Our Sample Code EditText txtData = (EditText) findViewById(R.id.txtData); Button btnReadSDFile = (Button) findViewById(R.id.btnReadSDFile); btnReadSDFile.setOnClickListener(new
Our team is writing its first JSF 2.0 application since using Stripes for many
Our project is a content management system supporting several dozen of our websites. The
Our iPhone app code currently uses NSURLConnection sendSynchronousRequest and that works fine except we
Our current project does not use Hibernate (for various reasons) and we are using
Our UITableView returns the number of rows for a given section. What we're experiencing
I have a UITableView , using a CoreData SQLLite data source and NSManagedObjectContext .
So I am using an array of dates as Section Headers in my UITableView.
i am using the Code example from Apple, to display a UIDatePicker when a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.