[yast-devel] Re: [yast-commit] r60152 - in /trunk/printer/src: connectionwizard.ycp helps.ycp overview.ycp
Hi, Johannes,
Author: jsmeix Date: Fri Dec 18 14:43:50 2009 New Revision: 60152
URL: http://svn.opensuse.org/viewcvs/yast?rev=60152&view=rev Log:
I was almost toast in the encoding hell but it seems now the percent encoding stuff works, see bnc#561626
Now this is how a scarry svn commit looks like ;-) I did not look much into the details of special char escaping you implemented for the y2-printer, but I was wondering - did you check what's provided by existing URL.ycp module? This one: http://forgeftp.novell.com/yast/doc/SL11.2/modules/URL.html It implements some Escape and UnEscape functions you might find useful, without re-cycling pretty much the same code in printer again. If you find those not satisfactory, maybe you could extend the existing functionality in URL.ycp so that everyone can benefit from it. So short ... fB.
========================================================================== ==== --- trunk/printer/src/connectionwizard.ycp (original) +++ trunk/printer/src/connectionwizard.ycp Fri Dec 18 14:43:50 2009 @@ -43,88 +43,218 @@ string connection_uri=""; string connection_model="";
-// Map of reserved URI characters ! # $ % & ' ( ) * + , / : ; = ? @ [ ] -// plus the space character and their matching percent encoding +// List of reserved URI characters ! # $ % & ' ( ) * + , / : ; = ? @ [ ] +// (the % character is separated as percentage_percent_encoding) +// plus the space character and their matching percent encodings // where each percent encoding must be exactly three characters -// and uppercase letters, otherwise URIpercentDecoding will not work: -map< string, string > uri_percent_encodings = $[ " ":"%20", - "!":"%21", - "#":"%23", - "$":"%24", - "&":"%26", - "'":"%27",
-- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter
Argh, wrong Reply-to. Sorry for the noise :(
Hi, Johannes,
Author: jsmeix Date: Fri Dec 18 14:43:50 2009 New Revision: 60152
URL: http://svn.opensuse.org/viewcvs/yast?rev=60152&view=rev Log:
I was almost toast in the encoding hell but it seems now the percent encoding stuff works, see bnc#561626
-- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter
On Thu, Jan 07, 2010 at 01:33:17PM +0100, Bubli wrote:
Argh, wrong Reply-to. Sorry for the noise :(
No need, just call it "code review" instead of "noise". We do it a lot with WebYaST :) -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
On 7.1.2010 13:30, Katarina Machalkova wrote:
Hi, Johannes,
Author: jsmeix Date: Fri Dec 18 14:43:50 2009 New Revision: 60152
URL: http://svn.opensuse.org/viewcvs/yast?rev=60152&view=rev Log:
I was almost toast in the encoding hell but it seems now the percent encoding stuff works, see bnc#561626 [...] It implements some Escape and UnEscape functions you might find useful, without re-cycling pretty much the same code in printer again. If you find those not satisfactory, maybe you could extend the existing functionality in URL.ycp so that everyone can benefit from it.
Or look at URLRecode.pm module, it supports also non-ASCII recoding. (It was needed in case of file:// URL with localized characters in the path, see bnc#446395.) -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Hello, On Jan 7 13:30 Katarina Machalkova wrote (shortened):
... maybe you could extend the existing functionality in URL.ycp so that everyone can benefit from it.
I have no overall knowledge about URL encoding. Therefore I cannot decide whether or not URL.ycp is broken or implemented as is intentionally (there are almost no useful comments in its source so that I don't know about the ideas behind). I have only limited knowledge about URI encoding for the special case of CUPS device URIs. Therefore I prefer to be on the safe side and do not (ab)use an URL encoding module but implement my own CUPS device URI encoding. Maybe you could review my CUPS device URI encoding implementation and check the appropriate RFCs to make one single general YaST URL/URI encoding implementation which works for any case. By the way: I wonder why there is no basic system library for such stuff so that any kind of application could use it - YCP is an application from a basic system level point of view ;-) By the way 2): As far as I know web-browsers implement their own special way of URL encoding for the browser's URL user input field ;-) Welcome to the encoding hell! Kind Regards Johannes Meixner -- SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany AG Nuernberg, HRB 16746, GF: Markus Rex -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (4)
-
Johannes Meixner
-
Katarina Machalkova
-
Ladislav Slezak
-
Martin Vidner