Bug 25554 - CultureInfo for zh-CHS returns null for Parent, it should be zh-Hans
Summary: CultureInfo for zh-CHS returns null for Parent, it should be zh-Hans
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-12-21 04:29 UTC by Aetf
Modified: 2014-12-22 12:50 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Aetf 2014-12-21 04:29:40 UTC
Steps to reproduce:
use a simple test program:

using System;
using System.Globalization;

namespace CultureInfoTest
class MainClass
    public static void Main(string[] args)
        // Prints the header.
        Console.WriteLine("SPECIFIC CULTURE                                     PARENT CULTURE");

        var ci = new CultureInfo("zh-CHS");
        Console.Write("0x{0} {1} {2,-40}", ci.LCID.ToString("X4"), ci.Name, ci.EnglishName);
        if (ci.Parent == null)
            Console.WriteLine("Null Parent!!!");
            Console.WriteLine("0x{0} {1} {2}", ci.Parent.LCID.ToString("X4"), ci.Parent.Name, ci.Parent.EnglishName);

SPECIFIC CULTURE                                     PARENT CULTURE
0x0004 zh-CHS Chinese (Simplified) Legacy             Null Parent!!!

Expected result: (On Windows 10, Visual Studio 2013, .Net 4.5)
SPECIFIC CULTURE                                     PARENT CULTURE
0x0004 zh-CHS Chinese (Simplified) Legacy             0x0004 zh-Hans Chinese (Simplified)
Comment 1 Aetf 2014-12-22 01:29:33 UTC
I have created a pull request on Github[1]

[1] https://github.com/mono/mono/pull/1472