Mailinglist Archive: yast-devel (37 mails)
| < Previous | Next > |
Re: [yast-devel] YCP String operator [] and UTF-8
- From: Johannes Meixner <jsmeix@xxxxxxx>
- Date: Tue, 3 Apr 2012 09:37:31 +0200 (CEST)
- Message-id: <alpine.LNX.2.00.1204030925300.8189@nelson.suse.de>
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 https://bugzilla.novell.com/show_bug.cgi?id=728588
Could a YCP expert show the correct way (example code)
how to remove an UTF8 sub-string from an UTF8 string?
I.e. how to remove "Bar" from "FooBarBaz" in an UTF8-safe way?
More generally:
Is there documentation how to work on UTF8 strings with YCP in general?
Kind Regards
Johannes Meixner
--
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx
| < Previous | Next > |