Skip to content

fix(locale): use five-digit postcodes with assigned prefixes for ko - #4276

Merged
ST-DDT merged 1 commit into
faker-js:nextfrom
wonjangcloud9:fix/ko-postcode-five-digit
Nov 18, 2026
Merged

ST-DDT merged 1 commit into
faker-js:nextfrom
wonjangcloud9:fix/ko-postcode-five-digit

Conversation

@wonjangcloud9

Copy link
Copy Markdown
Contributor

South Korea replaced its six-digit postcodes (XXX-XXX) with five-digit ones on 1 August 2015 (see https://en.wikipedia.org/wiki/Postal_codes_in_South_Korea). The ko patterns were ['###-###', '#####'], so half of fakerKO.location.zipCode() results used the retired format, and the other half could start with a prefix no area has, like 67098 or 98306. Only 29.6% of 100,000 generated codes could be Korean postcodes.

The first two digits of a Korean postcode identify the province or metropolitan city, from 01 (Seoul) to 63 (Jeju). This lists the 59 prefixes used by the 3,307 post offices in Korea Post's nationwide post office list (as of 2026-08-31): 01–08, 10–18, 21–59 and 61–63, one pattern each so every prefix is equally likely. With this change, all 100,000 generated codes are five digits with one of those prefixes.

Prepared with Claude Code and checked by me.

🤖 Generated with Claude Code

Korea replaced its six-digit postcodes (XXX-XXX) with five-digit ones
on 2015-08-01, but half of fakerKO.location.zipCode() results still used
the old format, and the other half could start with prefixes no area
uses (64-99, 00, ...). List the 59 two-digit prefixes Korea Post uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wonjangcloud9
wonjangcloud9 requested a review from a team as a code owner November 16, 2026 13:52
@netlify

netlify Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 48402b7
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6afb0aa7426952e93aa8cf10
😎 Deploy Preview https://deploy-preview-4276.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: location Something is referring to the location module labels Nov 16, 2026
@ST-DDT ST-DDT added this to the v11.0 milestone Nov 16, 2026
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (5060c90) to head (48402b7).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #4276   +/-   ##
=======================================
  Coverage   99.14%   99.14%           
=======================================
  Files        1180     1180           
  Lines        3977     3977           
  Branches      723      709   -14     
=======================================
  Hits         3943     3943           
  Misses         29       29           
  Partials        5        5           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ST-DDT ST-DDT left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you familiar with/native to Korean postcodes?

E.g. 60 appears as postcode on the wiki page, but is omitted here. Can you enlighten me on that?

@wonjangcloud9

Copy link
Copy Markdown
Contributor Author

Yes, I'm Korean. 60 is a row on that wiki page, but it has no districts. The English and Korean tables both leave it empty, the same as 09, 19 and 20, which I also left out. To be sure, I counted every postcode in Korea Post's full postcode database (updated 2026-11-09). None of its 34,403 postcodes starts with 09, 19, 20 or 60, and every one starts with one of the 59 prefixes in this PR.

@ST-DDT
ST-DDT added this pull request to the merge queue Nov 18, 2026
Merged via the queue into faker-js:next with commit 628aa57 Nov 18, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: locale Permutes locale definitions m: location Something is referring to the location module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants