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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:09:06+00:00 2026-06-06T07:09:06+00:00

The Unicode Common Locale Data Repository (CLDR) has a wealth of information regarding the

  • 0

The Unicode Common Locale Data Repository (CLDR) has a wealth of information regarding the relationship between languages and characters. For example, you can determine which characters are utilized in a particular language by looking at the misc.exemplarCharacters chart. The raw data for these charts are stored as XML files and the exemplar characters are stored as regular expressions according to the Unicode Regular Expressions standard UTS18.

Here’s a few examples of what UTS18 regex expressions look like:

1. [a à b c ç d e é è f g h i í ï j k l ŀ m n o ó ò p q r s t u ú ü v w x y z]
2. [অ আ ই ঈ উ ঊ ঋ এ ঐ ও ঔ ং \u0981 ঃ ক খ গ ঘ ঙ চ ছ জ ঝ ঞ ট ঠ ড {ড\u09BC}ড় ঢ {ঢ\u09BC}ঢ় ণ ত থ দ ধ ন প ফ ব ভ ম য {য\u09BC} ৰ ল ৱ শ ষ স হ া ি ী \u09C1 \u09C2 \u09C3 ে ৈ ো ৌ \u09CD]
3. [a á b ɓ c d ɗ e é ɛ {ɛ\u0301} f g i í j k l m n {ny} ŋ o ó ɔ {ɔ\u0301} p r s t u ú ū w y]

I’m using PHP and SimpleXML to parse the XML data and isolate these regex strings. Now, I would like to match individual multi-byte characters to these regular expressions. I’m currently using the mb_ereg_match function, which yields one or more of the following warnings (depending on the regex):

mbregex compile err: premature end of char-class in ...
mbregex compile err: empty range in char class in ...
mbregex compile err: empty char-class in ...

Any ideas as to why this isn’t working?

  • 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-06T07:09:08+00:00Added an answer on June 6, 2026 at 7:09 am

    As suggested by Sergey, I added the following lines before calling the mb_ereg_match() function:

    mb_internal_encoding('UTF-8');
    mb_regex_encoding('UTF-8');
    

    This addition eliminated two of the warnings listed above. I was only left with the following warning:

    mbregex compile err: empty char-class in ...
    

    After some additional debugging, I discovered that a handful of the CLDR XML files do in fact contain empty regular expression strings. For example, in kn.xml we have the following line:

    <exemplarCharacters type="auxiliary">[]</exemplarCharacters>
    

    I believe these lines are erroneous, as the expected behavior would be to simply leave the line out altogether (which is mostly the case throughout the CLDR).

    Thus, I was able to eliminate this last error by simply throwing out empty regex strings.

    Hope this helps someone else!

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

Sidebar

Related Questions

Does Unicode store stroke count information about Chinese, Japanese, or other stroke-based characters?
Why Unicode has several reserved character codes? See the Unicode for two languages- Kannada
I have a URL with unicode characters in it http://www.argaam.com/Common/Handlers/DownloadAttachment.aspx?referer=/portal&fileName=اعمار . -الربع الثاني_633857794599657020.pdf&folder=\CompanyFinancialResults\ this
Unicode has a set of characters for punctuation such as ellipsis (…), En-Dash (–)
Unicode has a million icon-like glyphs, but they're not always easy to search by,
Some Unicode data is stored in file as '\u84b8\u6c7d\u5730' without any encoding. Is there
Possible Duplicate: Why both UNICODE and _UNICODE? What is the difference between UNICODE and
I have heard that some characters are not present in the Unicode standard despite
I found some interesting bit twiddling in source\common\unicode\utf.h file of ICU library (International Components
I'm developing an application in MinGW/C++ that uses Windows' common dialogs. The need has

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.