Re: [yast-devel] YCP String operator [] and UTF-8

2012-04-03 Thread Johannes Meixner
Hello, On Mar 30 17:01 Ladislav Slezak wrote (excerpt): YCP string operator [] takes _byte_ index in the string, while size(string) returns _number_of_characters_. The problem is when you combine both functions, the result will be probably buggy, see

Re: [yast-devel] YCP String operator [] and UTF-8

2012-04-03 Thread Klaus Kaempf
* Ladislav Slezak lsle...@suse.cz [Apr 03. 2012 10:08]: I'm not sure what the correct solution is. Maybe the correct way is to fix the [] operator after all... In YCP, all strings are supposed to be UTF-8 encoded. This is how YaST was designed from the beginning. From that perspective,

Re: [yast-devel] Re: YCP substring() Was: YCP String operator [] and UTF-8

2012-04-03 Thread Arvin Schnell
On Tue, Apr 03, 2012 at 11:07:57AM +0200, Ladislav Slezak wrote: Dne 3.4.2012 10:15, Klaus Kaempf napsal(a): Ooops, I just realized that the problem is actually in substring() function, [] operator works only with lists, maps or terms in YCP. (I'm using so many languages...). I used