Hi,

On Tue, Apr 10, Arvin Schnell wrote:

> On Thu, Apr 05, 2012 at 11:02:35AM +0200, Josef Reidinger wrote:
> 
> > I still think that main problem is that we want unicode strings in
> > YaST, but we use in backend string. I think that now it is right time
> > to try to switch string implementation to wstring and be ready to such
> > change. I can create set of patches if someone is interested in it and
> > test it.
> 
> I also had a look at this. But changing the main member variable
> of YCPString from std::string to std::wstring is not trivial
> possible since the function value_cstr exposes it and that
> function is used not only in yast2-core. I also noticed that
> glibc does not provide regex functions for wchar_t. Here we would
> have to use boost adding a dependencies on libboost_regex.
> 
> So maybe just fixing the few builtins is easier. My idea is to
> use std::string operations when the YCPStrings are ASCII,
> std::wstring otherwise. I checked how many YCPString are used and
> how many of these are non-ascii: Starting yast2 storage (in
> german locale) constructs about 15000 YCPStrings of which only
> 400 are non-ascii (almost all help texts). So the idea seems
> sane.
> 
> You can find a patch in
> ~aschnell/Export/yast2-core-utf8.1.diff. Be aware that it changes
> to ABI of libycp, so you have to recompile a lot of stuff.
> 
> Comments?

I would support this approach.

The diff is not really small but this approach minimizes the
impact of the change to other parts of yast2 while not 
introducing too big penalties regarding performance and memory
requirements for the majority of ascii strings.

Tschuess, 
        Thomas Fehr
-- 
  Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
  GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
  Tel: +49-911-74053-0,  Fax: +49-911-74053-482,  Email: [email protected]
  GPG public key available.
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to