Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
naotoj committed Nov 7, 2024
1 parent d49f210 commit 6578b33
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,10 @@ private static Stream<String> extractLinks(Path tzFile) {
// Note: the entries are alphabetically sorted, *except* the "world" region
// code, i.e., "001". It should be the last entry for the same windows time
// zone name entries. (cf. TimeZone_md.c)
//
// The default entries from CLDR's windowsZones.xml file can be modified
// with WinZoneParseHandler.endDocument(), where mapping overrides
// can be specified.
private static void generateWindowsTZMappings() throws Exception {
Files.createDirectories(Paths.get(DESTINATION_DIR, "windows", "conf"));
Files.write(Paths.get(DESTINATION_DIR, "windows", "conf", "tzmappings"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -39,7 +39,7 @@
* windowsZones.xml
*/

class WinZonesParseHandler extends AbstractLDMLHandler<Object> {
class WinZonesParseHandler extends AbstractLDMLHandler<String> {
@Override
public InputSource resolveEntity(String publicID, String systemID) throws IOException, SAXException {
// avoid HTTP traffic to unicode.org
Expand All @@ -65,4 +65,14 @@ public void startElement(String uri, String localName, String qName, Attributes
break;
}
}

@Override
public void endDocument() {
// Placeholder for patching old CLDR windowsZones mappings
getData().putAll(
Map.of(
// "Foo Standard Time:ZZ", "Foo/Bar"
)
);
}
}

0 comments on commit 6578b33

Please sign in to comment.