Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-23 Thread Uwe Stöhr
> No, they are not treated as before. A "\%" in an URL style results now in > "\\\%" in .tex file, previously it resulted in "\%". This is IMHO not > acceptable. I said: When you have a LyX file created with LyX 1.5 or before that contains "\%" in a URL inset, this will be converted to an URL c

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-23 Thread Martin Vermeer
On Tue, Oct 23, 2007 at 05:31:29PM +0200, Georg Baum wrote: > Uwe Stöhr wrote: > > > >> I couldn't get to make .find() work with docstrings. > > >> Could you implement this? > > > > > > No time. But docstrings work exactly like std::string, so you should > > > not need to do more than changin

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-23 Thread Georg Baum
Uwe Stöhr wrote: > >> I couldn't get to make .find() work with docstrings. > >> Could you implement this? > > > > No time. But docstrings work exactly like std::string, so you should > > not need to do more than changing the types string->docstring and > > char->char_type. > > This is what

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-22 Thread Uwe Stöhr
>> This cries for future bugs. Please change to docstring. > > And I also suggest a reading of lstrings.h in order to avoid reinventing > the wheel (hint: we already have contains() and subst() methods). Thanks for the hint. I'll switch to these methods if neccesary. But I need help for the docst

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-22 Thread Uwe Stöhr
>> I couldn't get to make .find() work with docstrings. >> Could you implement this? > > No time. But docstrings work exactly like std::string, so you should not > need to do more than changing the types string->docstring and > char->char_type. This is what I did but I get then a huge list of com

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-15 Thread Georg Baum
[resent since gmane ate the original message yesterday] Uwe Stöhr wrote: >  >> -     docstring const & name = getParam("name"); >  >> +     string url = to_utf8(getParam("target")); > >  > This is wrong. String processing must not be done with utf8 encoded >  > strings. It can fail in many ways,

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-15 Thread Georg Baum
[second try to resend since gmane ate the original message yesterday and the first one of today] Uwe Stöhr wrote: >  >> -     docstring const & name = getParam("name"); >  >> +     string url = to_utf8(getParam("target")); > >  > This is wrong. String processing must not be done with utf8 encod

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-14 Thread Enrico Forestieri
On Sun, Oct 14, 2007 at 03:10:53AM -, [EMAIL PROTECTED] wrote: > Author: uwestoehr > Date: Sun Oct 14 05:10:51 2007 > New Revision: 20963 > > URL: http://www.lyx.org/trac/changeset/20963 > Log: > InsetHyperlink.cpp: fix bug 449: handle special characters in the url and > name field > > Modi

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-14 Thread Enrico Forestieri
On Sun, Oct 14, 2007 at 04:26:50PM +0200, Jürgen Spitzmüller wrote: > Uwe Stöhr wrote: > >  > This is wrong. String processing must not be done with utf8 encoded > >  > strings. It can fail in many ways, for example url.length() may not be > >  > equal to the number of characters. > > > > But I do

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-14 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: >  > This is wrong. String processing must not be done with utf8 encoded >  > strings. It can fail in many ways, for example url.length() may not be >  > equal to the number of characters. > > But I don't use a .length() call to avoid this. This cries for future bugs. Please chang

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-14 Thread Uwe Stöhr
>> - docstring const & name = getParam("name"); >> + string url = to_utf8(getParam("target")); > This is wrong. String processing must not be done with utf8 encoded > strings. It can fail in many ways, for example url.length() may not be > equal to the number of characters. But I don't u

Re: [Cvslog] r20963 - /lyx-devel/trunk/src/insets/InsetHyperlink.cpp

2007-10-14 Thread Georg Baum
Am Sonntag, 14. Oktober 2007 05:10 schrieb [EMAIL PROTECTED]: > InsetHyperlink::InsetHyperlink(InsetCommandParams const & p) > @@ -58,14 +65,61 @@ > int InsetHyperlink::latex(Buffer const &, odocstream & os, > OutputParams const & runparams) const > { > - docstring const &