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 substring() to get one character. So the problematic call is actually:
substring("áa", 1, 1);
which returns "\0xF1" instead of "a" as I expected.
The documentation does not tell whether the substring() argument units are in bytes or characters. http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/substring-rest.html
YCP has the function lsubstring: http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/lsubstring-rest.html For many functions though there is no UTF-8 aware version, e.g. search, tolower, deletechars, findfirstof, ... Regards, Arvin -- Arvin Schnell, <aschnell@suse.de> Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org