From: John Chittum Date: Tue, 17 Feb 2026 15:12:46 +0100 Subject: Escape unicode bidi-char in comment Bug: https://issuetracker.google.com/issues/446931058?pli=1 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libphonenumber/+bug/2124964 gcc-15 default in Ubuntu runs with -Werror=bidi-char=. Bidi-char warnings are not supressable with pragma. Instead, escape the comment into <> instead of [] so it is not interpreted as unicode. Last-Update: 2025-09-23 --- cpp/test/phonenumbers/phonenumberutil_test.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/test/phonenumbers/phonenumberutil_test.cc b/cpp/test/phonenumbers/phonenumberutil_test.cc index 4f69903..da71ae9 100644 --- a/cpp/test/phonenumbers/phonenumberutil_test.cc +++ b/cpp/test/phonenumbers/phonenumberutil_test.cc @@ -1623,8 +1623,11 @@ TEST_F(PhoneNumberUtilTest, ExtractPossibleNumber) { ExtractPossibleNumber("(650) 253-0000.", &extracted_number); EXPECT_EQ("650) 253-0000", extracted_number); // This case has a trailing RTL char. + // gcc-15+ introduces a new warning for invisible bidi Unicode characters + // compiling with gcc-15, -Wbidi-chars -Werror, this test will fail + // But it's meant to test a bidi char as it's a generally unsafe thing ExtractPossibleNumber("(650) 253-0000\xE2\x80\x8F" - /* "(650) 253-0000‏" */, &extracted_number); + /* "(650) 253-0000" */, &extracted_number); EXPECT_EQ("650) 253-0000", extracted_number); }