hibernate-orm
                                
                                
                                
                                    hibernate-orm copied to clipboard
                            
                            
                            
                        HHH-14032 Parse Locales with scripts properly in LocaleTypeDescriptor.fromString
Locales with scripts (e.g. zh-Hant-HK) were not parsed properly by LocaleTypeDescriptor, causing the script part to get lost.
Sorry for the delay with this. I've gone with a different approach here that does not use a loop or switch statement at all. One caveat is that I decided not to attempt to parse extensions at all, as that is its own little rabbit hole; this PR strictly adds support for parsing scripts. I am not sure how prevalent bcp47 extensions are in practice, but I am assuming that script is more widely used and important. Extensions could be tackled in a follow up, as the way the code is rewritten would allow it to be extended fairly trivially.
Thanks for your pull request!
This pull request appears to follow the contribution rules.
› This message was automatically generated.