Encoding scheme of DBpedia URIs


As percent-encoding is strongly discouraged by the RDF specification, DBpedia's URI encoding scheme avoids it as much as possible. Our choice of encoded characters is based on Section 2.4.3 of RFC 2396.


  • The following characters that may occur in Wikipedia page names are percent-encoded:
    • " (double quotes)
    • % (percent)
    • ? (question mark)
    • \ (backslash)
    • ^ (caret)
    • ` (backtick)
  • The following characters are not allowed in Wikipedia page titles, but the DBpedia framework is configured to percent-encode them anyway, for example when they occur in an internal link:
    • # (hash)
    • < (opening pointy bracket)
    • > (closing pointy bracket)
    • [ (opening square bracket)
    • ] (closing square bracket)
    • { (opening curly bracket)
    • | (pipe)
    • } (closing curly bracket)
  • The space character ' ' is converted into an underscore character '_'.
    • Multiple underscores are collapsed into one, leading and trailing underscores are removed.
  • If URIs instead of IRIs are used, all non-ASCII characters are percent-encoded.

Please note that within the Internationalization efforts, the encoding scheme might change.


URI encoding differences between DBpedia 3.7 and DBpedia 3.8


  • The following characters that used to be percent-encoded in DBpedia 3.7 URIs are no longer encoded in DBpedia 3.8 URIs:
    • ! (exclamation mark)
    • $ (dollar sign)
    • ' (apostrophe)
    • ( (opening parenthesis)
    • ) (closing parenthesis)
    • + (plus sign)
    • ; (semicolon)
    • @ (at sign)
    • = (equals sign)
    • ~ (tilde)

DBpedia URI encoding rules for all ASCII-characters


Characters In 3.8 URIs In 3.7 URIs
space _ _
! ! %21
" %22 %22
# %23 %23
$ $ %24
% %25 %25
& & &
' ' %27
( ( %28
) ) %29
* * *
+ + %2B
, , ,
. . .
/ / /
0 – 9 0 – 9 0 – 9
: : :
; ; %3B
< %3C %3C
= = %3D
%3E %3E
? %3F %3F
@ @ %40
A – Z  A – Z  A – Z 
[ %5B %5B
\ %5C %5C
] %5D %5D
^ %5E %5E
_ _ _
` %60 %60
a – z  a – z  a – z 
{ %7B %7B
| %7C %7C
} %7D %7D
~ ~ %7E

 
There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]

Information

Last Modification: 2014-02-03 05:39:22 by Christopher Sahnwaldt