<i18n dev> java.util.Fomatter precision and surrogate pairs
jason_mehrens at hotmail.com
Sun Feb 14 00:09:26 UTC 2021
Sorry for the off thread reply. I didn't have the mail replies setup on the list and I seem to be unable to add a in-reply-to header via web email.
> Although the error message may be confusing, 'c' conversion cannot be
> used for a String argument (like in your example). It simply converts
> numeric value into a single character, thus no need for output
> "precision." I am not the designer of the class, so might be wrong.
Yes I totally missed that. I dug up the relevant source:
So this code doesn't deal with CharSequence and therefore the precision is implicitly one. With the exception if null getting converted to 4 chars.
Is it worth me filing an RFE to allow 'c' to accept a CharSequence and allow precision to be set?
More information about the i18n-dev