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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:58:39+00:00 2026-05-29T10:58:39+00:00

RE2 is great. Fast and deterministic. However, it supports only UTF8. My strings are

  • 0

RE2 is great. Fast and deterministic.

However, it supports only UTF8. My strings are natively UTF16, and converting back and forth would kill performance.

How difficult would it be to implement native UTF16 capability in RE2?

How difficult would it be to implement native UCS-2 capability in RE2? (this should be easier)

i.e. how many hours would a regular programmer need to do this.

This has been bothering me for a couple of weeks, so I thought I would ask!

  • 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-05-29T10:58:40+00:00Added an answer on May 29, 2026 at 10:58 am

    Russ Cox, the creator of RE2, was kind enough to post the patch for UCS-2 support. Some assertions, however, are not supported for UCS-2. Reply from Russ is posted verbatim:

    Hi. RE2 had a UCS-2 mode before I open sourced it, but it could not
    support assertions like ^, $, and \b, which limited its utility. If
    you don’t need those operators, then it would probably work for you.
    I don’t plan to re-add UCS-2 mode to the RE2 sources, but I did just
    publish the diff for the change that removed it. You should be able
    to reverse the diff in a local copy to get the UCS-2 support back.
    The file is ucs2.diff in the root of the Mercurial repository.

    Enjoy.

    Link to code: http://code.google.com/p/re2/source/list

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

Sidebar

Related Questions

i just discovered http://code.google.com/p/re2 , a promising library that uses a long-neglected way (
I've Created a UITableViewController subclass. Do I only need one controller? Do I just
The Linux kernel uses lock; addl $0,0(%%esp) as write barrier, while the RE2 library
I'm trying to parse an array of JSON objects into an array of strings
Update : The ClassNotFoundException only occurs if I try to use the web service
I am using the following code to test google's RE2 library int main() {
I can't figure out what the longest_match option does in Google's re2 library. Explanations
I'm taking my first foray into C++, specifically the Google RE2 library, and I
I am wondering why the following two types struct { double re[2]; }; and
I m writing a simple Makefile which looks like this CC=gcc CXX=g++ DEBUG=-g COMPILER=${CXX}

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.