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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:52:20+00:00 2026-06-04T09:52:20+00:00

I want to perform search on a LONGBLOB field containing Arabic text data. For

  • 0
  1. I want to perform search on a LONGBLOB field containing Arabic text data. For example, how do U search "هذه «الأولويات الدواوينية» ف" ?

    The table field has values like 3313537353B2623313630363B2623313631303B202623313630343B2623313537353B2623313630363B202623313539303B2623313538313B2623313537353B2623313631303B2623313537353B2623313630373B2623313630353B2026; however, if I retrieve the Arabic text value and display on a web page, it shows proper Arabic characters.

  2. If I change the data type of the field from LONGBLOB to LONGTEXT, will it affect the Arabic content text I have stored? I have almost 1500 records in that table.

  • 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-04T09:52:21+00:00Added an answer on June 4, 2026 at 9:52 am
    1. It’s important to understand the difference between a character and its encoding. The character ن, for example would be stored with very different bytes depending on its encoding. For example, it would be represented by the single byte 0xcc if encoded with the IBM1097 codepage, but the four byte sequence 0xfefffee5 if encoded with UTF-16. Worse, sometimes the same character can be represented in multiple ways within the same encoding.

      Unless MySQL knows which encoding was used, it won’t able to perform textual comparisons of the sort you need (whilst it can perform binary ones to search for the same byte sequences, this won’t apply your desired collation—i.e. how strings are compared, e.g. case insensitivity, or different bytes sequences representing the same characters).

      Therefore you must either provide the encoding information to MySQL when you perform your search, or have MySQL keep track of it from the moment it first receives the data (i.e. by storing the data in a string-type column rather than a binary-type one).

      It is much more usual (and indeed I strongly advise you) to store text data in string-type columns. LONGTEXT is one possibility, but might be overkill for your needs: it can store up to 4GiB of data! Perhaps TEXT or VARCHAR (which can both hold up to 64KiB) or MEDIUMTEXT (up to 16MiB) would be more appropriate?

      Once understood to be character data, MySQL can simply search for text using its String Comparison Functions or Regular Expressions. For example:

      SELECT * FROM mytable WHERE textcolumn LIKE '%هذه «الأولويات الدواوينية» ف%';
      

      This would search mytable for any record whose textcolumn field contains (according to its collation) the specified string anywhere within it.

    2. You must first understand with what encoding your existing data has been stored in the LONGBLOB column (which will be whatever encoding the originating client used when it inserted/updated the data).

      You can then convert it to a string-type column without problem—although note that if it differed between records, you will have to manage the conversion of each record on a case-by-case basis (but you would also face the same issue when retrieving the current data anyway). For example, if the data is encoded using UTF-8, you can convert the column to TEXT as follows:

      ALTER TABLE mytable MODIFY textcolumn TEXT CHARACTER SET utf8;
      

      Note that you must ensure your connection character set is correctly configured for your client in order to ensure that any necessary conversions occur when sending/retrieving string data.

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

Sidebar

Related Questions

I want to perform a LIKE style comparison with an IN operator e.g.: select
I want to perform a search query from my rails app, which uses the
I want to perform a JOIN on two Datatables in a Dataset. For example,
If I want to perform a search on a directory that contains thousands of
I want to allow users to perform a search without restriction of any character
I have an attribute of type BOOL and I want to perform a search
I want to perform a specific-type of search. I do not know if it
I want to do perform an internet search (think google images) on user input
I have an array, inside an array. I'd like to search the values in
I want to perform the equivalent of a 'dynamic SQL' search for a product

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.