Re: case-mapping part of a Unicode string

2009-06-30 Thread Paolo Bonzini
On 07/01/2009 02:04 AM, Bruno Haible wrote: size_t uppercased_part_3_4_len; uint8_t *uppercased_part_3_4 = u8_ct_toupper (pointer3, pointer4 - pointer3, pre, suf, iso639_language, NULL, NULL, &uppercased_part_3_4_len); pre = u8_casing_p

Re: case-mapping part of a Unicode string

2009-06-30 Thread Paolo Bonzini
size_t uppercased_part_3_4_len; uint8_t *uppercased_part_3_4 = u8_ct_toupper (pointer3, pointer4 - pointer3, u8_casing_prefix_context (s, pointer3 - s), u8_casing_suffix_context (pointer4, s_end - pointer4), iso639_language, NULL, NU

Re: case-mapping part of a Unicode string

2009-06-30 Thread Bruno Haible
Paolo Bonzini wrote: > Regarding this part, how could I use the incremental context > computation? The most probable use-cases of these incremental functions are - when your data structure is not a single string, but a concatenation of strings, - when you cache many casing_prefix_context_

Re: [bug-libunistring] Re: case-mapping part of a Unicode string

2009-06-30 Thread Pádraig Brady
Paolo Bonzini wrote: > It would be nice to have something in coreutils doing normalization... Bruno discussed adding a `unorm` util previously which we're considering: http://lists.gnu.org/archive/html/bug-coreutils/2009-02/threads.html#00224 The alternative existing `uconv` mentioned in that thr

Re: case-mapping part of a Unicode string

2009-06-30 Thread Bruno Haible
Paolo Bonzini wrote: > Can you show an example of case converting the 3rd, 6th and 7th > character of a string? First, you need the indices (in terms of units) of the 3rd, 4th, 6th, 8th character: const uint8_t *s = ...; const uint8_t *s_end = s + u8_strlen (s) + 1; const uint8_t *p = s;

Re: case-mapping part of a Unicode string

2009-06-29 Thread Paolo Bonzini
On 06/30/2009 12:43 AM, Bruno Haible wrote: About the functions, Paolo Bonzini wrote in : It seems to me that there is a limitation, in that you cannot turn to lowercase/uppercase/titlecase parts of a string; for that you

case-mapping part of a Unicode string

2009-06-29 Thread Bruno Haible
About the functions, Paolo Bonzini wrote in : > It seems to me that there is a limitation, in that you cannot turn to > lowercase/uppercase/titlecase parts of a string; for that you have to > use uc_toupper/lower/title and f