[PATCH v8 1/2] Add 'codepoint_collation' support for LC_COLLATE.

Florian Weimer fweimer@redhat.com
Thu Aug 26 15:11:25 GMT 2021


* Carlos O'Donell:

> @@ -2123,6 +2136,17 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
>  	  /* The words have to be handled specially.  */
>  	  if (idx == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_HASH_SIZEMB))
>  	    add_locale_uint32 (&file, 0);
> +	  else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_CODESET)
> +		   && collate != NULL)
> +	    /* A valid LC_COLLATE must have a code set name.  */
> +	    add_locale_string (&file, charmap->code_set_name);
> +	  else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_COLLSEQMB)
> +		   && collate != NULL)
> +	    add_locale_raw_data (&file, collseqmb, sizeof (collseqmb));
> +	  else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_COLLSEQWC)
> +		   && collate != NULL)
> +	    add_locale_uint32_array (&file, collseqwc,
> +				     array_length (collseqwc));
>  	  else
>  	    add_locale_empty (&file);
>  	}

This version looks okay to me.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian



More information about the Libc-alpha mailing list