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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:22:37+00:00 2026-05-23T19:22:37+00:00

For example this: <!– All the characters are going to be converted into a

  • 0

For example this:

<!-- All the characters are going to be converted into a Hex values depending the encoding used -->

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <!-- It Just interpret the Hex values that are going to be displayed -->


<?php

/* PHP Strings are bytestream */
/* PHP treat the strings as a Hex values from the econding used */

$string="€"; // Hex value from the Encoding Method(UTF-8). [U+20AC][E2|82|AC]
if(preg_match('/\xE2\x82\xAC/',$string,$m)){
    echo "Match<br>";
    print_r($m);
    }
else{
    echo "Don't Match";
    }

?>

As long as you use correct bytes secuences to Match Unicode Characters.
Is not needed to use Unicode Support?

or is that I’m thinking wrong?

  • 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-23T19:22:38+00:00Added an answer on May 23, 2026 at 7:22 pm

    For that particular match, you don’t need Unicode support. Any simple direct string match will work for two UTF-8 strings​—that was a deliberate design feature of UTF-8—but then you wouldn’t be using regex if all you needed was a direct string match: for your example you’d be better off with strpos.

    Many other regex features will behave unexpectedly without Unicode support. For example:

    /€*/
    

    with Unicode support, that’s multiple € signs (\xE2\x82\xAC\xE2\x82\xAC\xE2\x82\xAC...). Without it, that’s the first two bytes of a € symbol then any number of 0xAC bytes (\xE2\x82\xAC\xAC\xAC\xAC...), so the only valid UTF-8 sequence it would match would be a single €.

    /[x€]/
    

    with Unicode support, matches x or a euro. Without Unicode support, matching x or the byte 0xE2 or the byte 0x82 or the byte 0xAC.

    And so on.

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

Sidebar

Related Questions

so for example this will turn 1251 into utf-8. $utf8 = iconv('windows-1251', 'utf-8', $ansi);
I have values returned by unknown function like for example # this is an
In an attempt to build example code for this question, I ran into a
For example: // This will become either SomeMethodA or SomeMethodW, // depending on whether
I have for example this image tag: <img src=http://... .jpg al=myImage hhh=aaa /> and
I have a large array of URLS similar to this: $nodes = array( 'http://www.example.com/product.php?page=1&sortOn=sellprice',
Example: /** * This function will determine whether or not one string starts with
For example this article introduces them. What is the benefit? Static analysis seems cool
Say for example this is my code: $query = SELECT * FROM ...; $exec_query
Take for example this table (let's call it BIN_TABLE ): +------+------+ | 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.