Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid input syntax when inserting urls with accents #8

Open
natoinet opened this issue May 25, 2016 · 2 comments
Open

Invalid input syntax when inserting urls with accents #8

natoinet opened this issue May 25, 2016 · 2 comments

Comments

@natoinet
Copy link

Hello,

When inserting urls with accents, I run into the following error:

insert into urljson values ('http://www.example.com/évidemment', 200, 'text/html; charset=UTF-8', 33055);
ERROR:  invalid input syntax for type uri at or near "évidemment"
LINE 1: insert into urljson values ('http://www.example.com/évidemme...
                                                     ^

I know that urls should not contain accents ... But they actually do! Is it caused by some kind of encoding problems?

Thanks!

@petere
Copy link
Owner

petere commented Jun 6, 2016

Punycode is not supported. Maybe it should.

@cantoute
Copy link

cantoute commented Apr 16, 2020

In the mean time there is an other extension that can solve your problem.

https://github.com/okbob/url_encode

insert into urljson values
  (
    url_encode('http://www.example.com/évidemment'),
    200,
    'text/html; charset=UTF-8', 33055
  );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants