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

inconsistent handling of fields of type "uri" #1304

Closed
u-fischer opened this issue Aug 28, 2023 · 4 comments
Closed

inconsistent handling of fields of type "uri" #1304

u-fischer opened this issue Aug 28, 2023 · 4 comments
Assignees
Milestone

Comments

@u-fischer
Copy link

The following document adds more url-fields to the datamodel: a simply urli and a list of urls:

\begin{filecontents}[overwrite]{moreurl.dbx}
\DeclareDatamodelFields[type=field, datatype=uri]{urli}
\DeclareDatamodelEntryfields{urli}
\DeclareDatamodelFields[type=list, datatype=uri]{urls}
\DeclareDatamodelEntryfields{urls}
\end{filecontents}
\begin{filecontents}[overwrite]{moreurl.bib}
@Misc{testmoreurl,
  title =   "A text with more than one url",
  author =  "Jane Doe",
  year =    "2023",
  url =     "https://www.grüße mit space.de",
  urli=     "https://www.grüße mit space.de",
  urls=     {https://www.grüße mit space.de and https://someother.de},
}
\end{filecontents}

\documentclass{article}
\usepackage[backend=biber,datamodel=moreurl,openbib]{biblatex}
\addbibresource{moreurl.bib}  
\begin{document}
Cite \cite{testmoreurl}
\end{document}

The result in the bbl is somewhat inconsistent:

      \verb{urlraw}
      \verb https://www.grüße mit space.de
      \endverb
      \verb{url}
      \verb https://www.xn--gre%20mit%20space-cdb84b.de
      \endverb
      \verb{urli}
      \verb https://www.grüße mit space.de
      \endverb
      \lverb{urls}{2}
      \lverb https://www.xn--gre%20mit%20space-cdb84b.de
      \lverb https://someother.de
      \endlverb

url and urls percent encode the url, but urli doesn't. And only url has an urlraw variant. Would it be possible to unify this?

@plk
Copy link
Owner

plk commented Aug 29, 2023

This is a bug I am looking at - just to check - those encoded URLS also look mangled too correct?

@u-fischer
Copy link
Author

At first glance it doesn't look wrong, it seems to convert first to punycode and then replaces the spaces by %20. But https://www.gr%C3%BC%C3%9Fe%20with%20space.de as by https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI should imho be nowadays ok too.

plk added a commit to plk/biber that referenced this issue Aug 29, 2023
@plk
Copy link
Owner

plk commented Aug 29, 2023

Ah, forgot about punycode. This should all be fixed in DEV biber 2.20 now.

@plk plk self-assigned this Sep 3, 2023
@plk plk added the fixedindev Fixed in current DEV version label Sep 3, 2023
@plk plk added this to the v3.20 milestone Sep 3, 2023
plk added a commit to plk/biber that referenced this issue Sep 3, 2023
plk added a commit that referenced this issue Sep 3, 2023
@plk
Copy link
Owner

plk commented Sep 3, 2023

It also needs DEV biblatex 3.20.

@moewew moewew closed this as completed Mar 28, 2024
@moewew moewew added enhancement and removed fixedindev Fixed in current DEV version labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants