Loading…
jakubmuzik
Suggestion accepted |
|
sle-merge-robot
Suggestion added |
<p>
<b><big>Percent Encoding</big></b><br> The issue is complicated. It is recommended to avoid reserved characters and spaces for component values in URIs if the values are under your control (e.g. you cannot avoid it when you must specify such characters in values for an URI to access a remote print queue but the remote print queue is not under your control). Whenever possible use only so called 'unreserved characters'. Unreserved characters are uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde. Even hyphen, period, tilde, and case sensitivity could cause special issues in special cases (e.g. only letters, digits, and underscore are known to work for a CUPS print queue name and case is not significant there). Therefore it is best to use only lowercase letters, digits, and underscore for all values in all URIs if possible.<br> Reserved characters and space characters in the value of a component must be percent-encoded (also known as URL encoding).<br> When an input field in the dialog is intended to enter only a single value for a single component of the URI (e.g. separated input fields for username and password), you must enter spaces and reserved characters literally (i.e. non-percent-encoded). For such input fields all spaces and reserved characters will be automatically percent-encoded. For example if a password is actually 'Foo%20Bar' (non-percent-encoded), it must be entered literally in the password input field in the dialog. The automated percent-encoding results 'Foo%2520Bar' which is how the value of the password component is actually stored in the URI.<br> In contrast when an input field in the dialog is intended to enter more that a single value for a single component of the URI (e.g. a single input field for all optional parameters like 'option1=value1&option2=value2&option3=value3' or a single input field to enter the whole URI), you must enter spaces and reserved characters percent-encoded because an automated percent-encoding is no longer possible. Assume in an optional parameter 'option=value' the value would be 'this&that' so that the whole optional parameter would be 'option=this&that' (literally). But a literal '&' character denotes the separation of different optional parameters so that 'option=this&that' in an URI means a first optional parameter 'option=this' and a second optional parameter which is only 'that'. Therefore a single optional parameter 'option=this&that' must be entered percent-encoded as 'option=this%26that'<br> Input fields which require percent-encoded input are denoted by a '[percent-encoded]' hint.<br> Listing of characters and their percent encoding:<br> space ' ' is percent encoded as %20<br> exclamation mark ! is percent encoded as %21<br> number sign # is percent encoded as %23<br> Dollar sign $ is percent encoded as %24<br> percentage % is percent encoded as %25<br> ampersand & is percent encoded as %26<br> apostrophe / single quotation mark ' is percent encoded as %27<br> left parenthesis ( is percent encoded as %28<br> right parenthesis ) is percent encoded as %29<br> asterisk * is percent encoded as %2A<br> plus sign + is percent encoded as %2B<br> comma , is percent encoded as %2C<br> slash / is percent encoded as %2F<br> colon : is percent encoded as %3A<br> semicolon ; is percent encoded as %3B<br> equals sign = is percent encoded as %3D<br> question mark ? is percent encoded as %3F<br> at sign @ is percent encoded as %40<br> left bracket [ is percent encoded as %5B<br> right bracket ] is percent encoded as %5D<br> For details see 'Uniform Resource Identifier (URI): Generic Syntax' at<br> http://tools.ietf.org/html/rfc3986 </p> |
Things to check
Source string description
ConnectionWizardDialog help 3/7:Flags
c-format
<b><big>Percent Encoding</big></b><br>
The issue is complicated.
It is recommended to avoid reserved characters and spaces
for component values in URIs if the values are under your control
(e.g. you cannot avoid it when you must specify such characters
in values for an URI to access a remote print queue
but the remote print queue is not under your control).
Whenever possible use only so called 'unreserved characters'.
Unreserved characters are uppercase and lowercase letters,
decimal digits, hyphen, period, underscore, and tilde.
Even hyphen, period, tilde, and case sensitivity
could cause special issues in special cases
(e.g. only letters, digits, and underscore are known to work
for a CUPS print queue name and case is not significant there).
Therefore it is best to use only lowercase letters, digits,
and underscore for all values in all URIs if possible.<br>
Reserved characters and space characters in the value of a component
must be percent-encoded (also known as URL encoding).<br>
When an input field in the dialog is intended to enter
only a single value for a single component of the URI
(e.g. separated input fields for username and password),
you must enter spaces and reserved characters literally
(i.e. non-percent-encoded).
For such input fields all spaces and reserved characters
will be automatically percent-encoded.
For example if a password is actually 'Foo%20Bar' (non-percent-encoded),
it must be entered literally in the password input field in the dialog.
The automated percent-encoding results 'Foo%2520Bar' which is how
the value of the password component is actually stored in the URI.<br>
In contrast when an input field in the dialog is intended to enter
more that a single value for a single component of the URI
(e.g. a single input field for all optional parameters
like 'option1=value1&option2=value2&option3=value3'
or a single input field to enter the whole URI),
you must enter spaces and reserved characters percent-encoded
because an automated percent-encoding is no longer possible.
Assume in an optional parameter 'option=value'
the value would be 'this&that' so that the whole
optional parameter would be 'option=this&that' (literally).
But a literal '&' character denotes
the separation of different optional parameters
so that 'option=this&that' in an URI means
a first optional parameter 'option=this' and
a second optional parameter which is only 'that'.
Therefore a single optional parameter 'option=this&that'
must be entered percent-encoded as 'option=this%26that'<br>
Input fields which require percent-encoded input
are denoted by a '[percent-encoded]' hint.<br>
Listing of characters and their percent encoding:<br>
space ' ' is percent encoded as %20<br>
exclamation mark ! is percent encoded as %21<br>
number sign # is percent encoded as %23<br>
Dollar sign $ is percent encoded as %24<br>
percentage % is percent encoded as %25<br>
ampersand & is percent encoded as %26<br>
apostrophe / single quotation mark ' is percent encoded as %27<br>
left parenthesis ( is percent encoded as %28<br>
right parenthesis ) is percent encoded as %29<br>
asterisk * is percent encoded as %2A<br>
plus sign + is percent encoded as %2B<br>
comma , is percent encoded as %2C<br>
slash / is percent encoded as %2F<br>
colon : is percent encoded as %3A<br>
semicolon ; is percent encoded as %3B<br>
equals sign = is percent encoded as %3D<br>
question mark ? is percent encoded as %3F<br>
at sign @ is percent encoded as %40<br>
left bracket [ is percent encoded as %5B<br>
right bracket ] is percent encoded as %5D<br>
For details see 'Uniform Resource Identifier (URI): Generic Syntax' at<br>
http://tools.ietf.org/html/rfc3986
</p>
<b><big>
Procentové kódováníKódování procentem</big></b><br>Tento
problémzpůsob je komplikovaný.Je doporučeno v hodnotách částí URI vyhrazeným znakům
a mezerám předcházet, pokud jsou hodnoty pod vaší kontrolou
(např. tomu nemůžete předejít, pokud musíte taková písmena
zadat do adresy URI vzdálené fronty, kterou nemůžete ovládat).
Kdykoliv je to možné, používejte jen
'nevyhrazené znaky'.Nevyhrazené znaky jsou velká a malá písmena, desítkové číslice,
spojovník, tečka, podtržítko a vlnovka. Dokonce i spojovník,
tečka, vlnovka a rozlišování velikosti písmen může v některých
případech způsobovat problémy (např. v názvu fronty CUPS fungují
pouze písmena, čísla a podtržítko a velikost písmen není důležitá).
Pak, pokud je to možné, je nejlepší používat pro všechny hodnoty
celé adresy URI pouze malá písmena, čísla a podtržítko.<br>
Vyhrazené znaky a znaky mezery v částech adresy URI musí být
kódována procentem (také známé jako kódování URL).<br>
Když je vstupní pole v dialogu určeno pro zadání pouze jedné
hodnoty adresy URI (jako jsou např. políčka uživatelské jméno
a heslo), musíte mezery a vyhrazené znaky zadat přímo (tzn.
ve formě nekódované procentem.
V těchto vstupních polích jsou všechny takové znaky automaticky
zakódovány.Například pokud je heslo právě
'Foo%20Bar'(v nekódované formě),musí být do vstupního pole heslo v dialogu zadáno psanou formou. Automatický převod do procentem kódované formy povede k hodnotě
'Foo%2520Bar', což je to, jak je hodnota hesla uvedena u adrese URI.<br>Naproti tomu když je vstupní pole dialogu zamýšleno jako zadávací
pro více než jednu hodnotu částí adresy URI
(např. jedno vstupní pole pro všechny volitelné parametry,
jako jsou
'volba1=hodnota1&volba2=hodnota2&volba3=hodnota3'nebo jedno políčko pro vložení celé adresy URI), musíte
mezery a vyhrazené znaky zadat ve formě kódované procentem,
protože automatické překódování není v tomto případě k dispozici.
Představte si, že ve volitelných parametrech
'volba=hodnota'by měla být hodnota
'tohle&tamto', takže celý volitelnýparametr by měl být
'volba=tohle&tamto'(v doslovné formě).Jenže zápis znaku
'&'určuje rozdělení různých volitelnýchparametrů, takže zápis
'volba=tohle&tamto'v adrese URIznamená, že první parametr je
'volba=tohle'a druhý jepouze
'tamto'. Pak musí být řetězec'volba=tohle&tamto'v řádku volitelných parametrů uveden ve formě kódované
procentem jako
'volba=tohle%26tamto'<br>Vstupní pole, která vyžadují vstup ve formě kódované
procentem jsou označena radou
'[forma kódovaná procentem]'. Výpis znaků a jejich procentových kódů:<br>mezera
' '( ) je v procentovém kódu %20<br>vykřičník ! je v procentovém kódu %21<br>
značka číslo # je v procentovém kódu %23<br>
značka dolar $ je v procentovém kódu %24<br>
procento % je v procentovém kódu %25<br>
ampersand & je v procentovém kódu %26<br>
apostrof/jednoduchá uvozovka ' je v procentovém kódu %27<br>
levá kulatá závorka ( je v procentovém kódu %28<br>
pravá kulatá závorka ) je v procentovém kódu %29<br>
hvězdička * je v procentovém kódu %2A<br>
plus + je v procentovém kódu %2B<br>
čárka , je v procentovém kódu %2C<br>
lomítko / je v procentovém kódu %2F<br>
dvojtečka : je v procentovém kódu %3A<br>
středník ; je v procentovém kódu %3B<br>
rovnítko = je v procentovém kódu %3D<br>
otazník ? je v procentovém kódu %3F<br>
zavináč @ je v procentovém kódu %40<br>
levá hranatá závorka [ je v procentovém kódu %5B<br>
pravá hranatá závorka ] je v procentovém kódu %5D<br>
Pro další podrobnosti čtěte 'Uniform Resource Identifier (URI):
Generic Syntax' na adrese<br>
http://tools.ietf.org/html/rfc3986
</p>