* Ladislav Slezak <[email protected]> [Apr 03. 2012 11:10]:
> 
> 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
> 
> So any opinions on changing this call? Is the UTF-8 assumption also valid 
> here?

Yes. sub_string_ is operating on strings and strings are defined to be
UTF-8 encoded.

Regards,

Klaus
---
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: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to