What considerations should be made for international characters or languages when using preg_match in PHP?

When using preg_match in PHP with international characters or languages, it's important to consider the encoding of the characters. The Unicode characters may not be properly matched if the encoding is not handled correctly. To solve this issue, you can use the 'u' modifier in the regular expression pattern to ensure that Unicode characters are properly matched.

$string = "Résumé";
$pattern = '/\p{L}+/u'; // Match Unicode letters
if (preg_match($pattern, $string)) {
    echo "Match found!";
} else {
    echo "No match found.";
}