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 8342483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:47:19+00:00 2026-06-09T05:47:19+00:00

I need to create an app on Asp.net/PHP [Both are welcome] User can register

  • 0

I need to create an app on Asp.net/PHP [Both are welcome]

User can register with a arabic username or English username.

say that user registered with English username A ,

So when another user tried to register with Arabic version of A then i need to deny it.

How its posible ?

is there any way to get a unique value for both A ?

Thanks.

  • 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-09T05:47:20+00:00Added an answer on June 9, 2026 at 5:47 am

    Simply manipulate unicode strings. A good choice of encoding is UTF-8, for example.

    You should only manipulate unicode strings throughout your program, to avoid issues with some characters getting garbled when users enter special characters.

    If what you’re seeking to do is compare strings with some characters considered equivalent, for example with english and greek, A would be equivalent to alpha, then you need to build a list of equivalences, and transform the strings into a sequence of numbers, where each number is the number of the equivalence class of the character in the original string.

    The fastest method would be to build a dictionary (key/value pairs) like this, in PHP:

    equiv=array('a'=>1, 'i'=>1, 'u'=>1, 'alif'=>1, 'b'=>2, 'baa'=>2, ...);
    

    where you would replace 'alif' and 'baa' by the actual arabic characters in unicode.

    Then, transform the strings:

    transformed=array_map(function($c) { return $equiv[$c]; }, str_split($str));
    

    And then compare two transformed strings.

    This is called collating, and can also be used for case-insensitive comparisons of strings (make 'ab' equivalent to 'AB').

    Other than using numbers to identify the character classes, one can choose to use a character as the representative individual of its class. Then you would do :

    function fold_char($c) {
        return array_key_exists($c, $equiv) ? $equiv[$c] : $c;
    }
    equiv=array('a'=>'a', 'A'=>'a', 'i'=>'a', 'I'=>'a', 'u'=>'a', 'U'=>'a' 'alif'=>'a', 'b'=>'b', 'B'=>'b'  'baa'=>'b', ...);
    transformed=implode('', array_map(fold_char, str_split($str));
    

    This would transform the string with the characters 'a' 'B' 'U' into 'aba', and the string with the characters 'alif', 'baa', 'alif' into 'aba', so they would be considered equivalent.

    You can then store the converted string in your database along with the user name, to quickly check whether a given username already exists.

    I know some database engines allow you to define your own collating sequences (basically the equiv array above), but that would be the matter for another question.

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

Sidebar

Related Questions

I need to create a custom membership user and provider for an ASP.NET mvc
In my django app,I need to create a mapping between a username and a
I got a ASP.NET MVC 2.0 Preview 1 app and started to create some
I have built ASP.NET app. I need to utilize a third party COM object
How can I implement background processing queues in my ASP.NET MVC web app? While
I need to create an installer program that will do install the following: ASP.Net
I need to create a link for an ASP.NET page that has an image
My goal is to modify asp.net mvc's controller registery so that I can create
I'm an ASP.NET developer that has never done Winforms/WPF, but I need to create
I've just created my first ASP.NET MVC app. Since I didnt choose to create

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.