Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrjP7-0005h5-Vc for pgsql-novice@arkaria.postgresql.org; Thu, 19 May 2022 16:53:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nrjP6-0000LK-5l for pgsql-novice@arkaria.postgresql.org; Thu, 19 May 2022 16:53:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrjP5-0000L9-Rx for pgsql-novice@lists.postgresql.org; Thu, 19 May 2022 16:53:35 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nrjP2-0003Ma-Uq for pgsql-novice@lists.postgresql.org; Thu, 19 May 2022 16:53:35 +0000 Received: by mail-pf1-x432.google.com with SMTP id c14so5661764pfn.2 for ; Thu, 19 May 2022 09:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Yoz1AZ/Cp/+R1gW7ikVBnuS1NP27WrlwrqPP3cEwG30=; b=evsJwVhGN4YyG7HiuD2IivXXfxUxniXKeRDlBsI2MUDZ1GC7zCjBT/GJTsGt6QhMf5 9BYxphv1eSZeZj5m7ZdDbyQcZ2N0lewqKhCNijxJcspDld6fwXbiOyvtarip1eWF6AUP HwmfX46ZHdJIzoMMMW6v63A1mN2gFG2Cs0iacrSfNASISSbs88E3Aea0SXSly5CZjNPc bMpAXHAWpaCP/VnTqIsnSMZwsco2dgG3D92YT+3R7W6bi+0NhfWgPimQotKkEEmj3ldK bN8eBtMXlL3PnQSVg4z8sU1UWPurbAyq7nXrD7jkCDw4gynO7eGf0NQ8gkw4/9yX41J1 wGWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Yoz1AZ/Cp/+R1gW7ikVBnuS1NP27WrlwrqPP3cEwG30=; b=ThLEpOtbyCNRivhPEbzyVwI8UgIIRk2phpPDMdFafYXmLfhVsaLtd9tnjh3kzHkXwA 8Gj3rOcHCrvOS2ZyNcY4h1so0DiZIZej5+9mRkX8UxnCfWjgSDrE12DIkHosTmNGJSxh ipA4xaczd5C/1AsK/ZgqdOA4H6KKHVgJs9XTphZxgiNoiEapbsh8FaOadsvO7vLqusrm IHPLupBPDJ0hjOFraR+xF0BAjDLBKGBNxRrfubxnfduPX9xqDPQLFPr4s2czbYr6pwPr NYTA32GBpbQduYSh1WgAbhGvCWdzkrgNaItjAOphrh3uI1WGmX0A3k9bKaGGGOXsz/4q VWSg== X-Gm-Message-State: AOAM531wsR7gOhKHAzjj+KGGJe8RjK1adqpCi1/B0A6ORbYbVaW/asHY kTM1OLOuHQ4Wd3YATVdrvDqmPim00wqHUScifgKH1+FyvDqAPw== X-Google-Smtp-Source: ABdhPJzoXVsDx5OwfoWuyPnQX3N7L1WrxxpakgTdESvBvF8oe+IKqvNfsVXYVM+vjBvvX1EWY9TkYdh3y32vNK44SOw= X-Received: by 2002:a63:de55:0:b0:3f5:dc1f:8d91 with SMTP id y21-20020a63de55000000b003f5dc1f8d91mr4793664pgi.524.1652979209852; Thu, 19 May 2022 09:53:29 -0700 (PDT) MIME-Version: 1.0 From: mahendrakar s Date: Thu, 19 May 2022 22:23:19 +0530 Message-ID: Subject: Comparing two URL strings To: pgsql-novice Content-Type: multipart/alternative; boundary="0000000000009fdc2405df60361d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009fdc2405df60361d Content-Type: text/plain; charset="UTF-8" Hi, I am facing an issue in comparing two urls (below). 1) "https://domain.org/v1.0/users/test@user.org" 2) "https://domain.org/v1.0/users/test%40user.org" Comparison of the two strings is failing due to mismatch of '%40' and (@) character even though the both urls are the same. (gdb) p url $1 = 0x55d35cfbd1f8 "https://domain.org/v1.0/users/test@user.org" (gdb) p graph_url $2 = 0x7ffd82777240 "https://domain.org/v1.0/users/test%40user.org" Can you please let me know how to compare these two strings. One way I could think of is convert both the strings to utf-8 but don't find an utility function to compare the UTF-8 strings. Thanks, Mahendrakar. --0000000000009fdc2405df60361d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I am facing an issue=C2=A0in comparing two u= rls (below).

Comparison of th= e two strings is failing due=C2=A0to mismatch of '%40'=C2=A0 and (@= ) character even though the both urls are the same.
=C2=A0(gdb) p url$1 =3D 0x55d35cfbd1f8 "https://domain.org/v1.0/users/test@user.org"
(gdb) p = graph_url
$2 =3D 0x7ffd82777240 "https://domain.org/v1.0/users/test%40user.org&q= uot;

Can you please let me know how to c= ompare=C2=A0these two strings.
One way I could think of is conver= t both the strings to utf-8 but don't find an utility function to compa= re the UTF-8 strings.

Thanks,
Mahendraka= r.
--0000000000009fdc2405df60361d--