[hibernate-issues] [JIRA] (HHH-14032) Locales with scripts are not round-tripped properly

Patrick Strawderman (JIRA) jira at hibernate.atlassian.net
Mon May 18 19:17:06 EDT 2020


Patrick Strawderman ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A1cf0347a-9d47-4e35-bbd2-82a5175b43e2 ) *updated* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMGM0YzZhOGRlYjM1NDlhMWI0ZjEwMmY2NDA1MTlhZGMiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14032?atlOrigin=eyJpIjoiMGM0YzZhOGRlYjM1NDlhMWI0ZjEwMmY2NDA1MTlhZGMiLCJwIjoiaiJ9 ) HHH-14032 ( https://hibernate.atlassian.net/browse/HHH-14032?atlOrigin=eyJpIjoiMGM0YzZhOGRlYjM1NDlhMWI0ZjEwMmY2NDA1MTlhZGMiLCJwIjoiaiJ9 ) Locales with scripts are not round-tripped properly ( https://hibernate.atlassian.net/browse/HHH-14032?atlOrigin=eyJpIjoiMGM0YzZhOGRlYjM1NDlhMWI0ZjEwMmY2NDA1MTlhZGMiLCJwIjoiaiJ9 )

Change By: Patrick Strawderman ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A1cf0347a-9d47-4e35-bbd2-82a5175b43e2 )

Locales including scripts are not round-tripped properly by LocaleTypeDescriptor. An example of such a locale is “zh-Hant-HK”, which gets converted to a String as “zh_HK_#Hant” but read back as “zh- Hant HK ”.

LocaleTypeDescriptor.fromString builds the Locale instance uses the Locale constructor, which does not allow specifying a script or extension; alternatives would be to use [Locale.forLanguageTag|https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#forLanguageTag-java.lang.String-], or [Locale.Builder|https://docs.oracle.com/javase/8/docs/api/java/util/Locale.Builder.html].

( https://hibernate.atlassian.net/browse/HHH-14032#add-comment?atlOrigin=eyJpIjoiMGM0YzZhOGRlYjM1NDlhMWI0ZjEwMmY2NDA1MTlhZGMiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14032#add-comment?atlOrigin=eyJpIjoiMGM0YzZhOGRlYjM1NDlhMWI0ZjEwMmY2NDA1MTlhZGMiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100126- sha1:09684e9 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200518/0468643c/attachment.html 


More information about the hibernate-issues mailing list