From: | mahendrakar s <mahendrakarforpg(at)gmail(dot)com> |
---|---|
To: | pgsql-novice <pgsql-novice(at)lists(dot)postgresql(dot)org> |
Subject: | Comparing two URL strings |
Date: | 2022-05-19 16:53:19 |
Message-ID: | CABkiuWpNDO16QXUoC93WMmjgco3WfzfvuppWe4udSZ4N2d3DqQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi,
I am facing an issue in comparing two urls (below).
1) "https://domain.org/v1.0/users/test(at)user(dot)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(at)user(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Alan Hodgson | 2022-05-19 17:05:36 | Re: Comparing two URL strings |
Previous Message | Tom Lane | 2022-05-17 05:42:11 | Re: Read rows from a table and process - Need pointers |