nuintun / qrcode

A pure JavaScript QRCode encode and decode library.
https://nuintun.github.io/qrcode
MIT License
194 stars 26 forks source link

汉字二维码编码区间 #321

Closed nuintun closed 1 year ago

nuintun commented 1 year ago
// 汉字二维码编码区间
[
  // 0xa1a1 - 0xaafe
  [0xa1a1, 0xa1fe],
  [0xa2a1, 0xa2aa],
  [0xa2b1, 0xa2e3],
  [0xa2e5, 0xa2ee],
  [0xa2f1, 0xa2fc],
  [0xa3a1, 0xa3fe],
  [0xa4a1, 0xa4f3],
  [0xa5a1, 0xa5f6],
  [0xa6a1, 0xa6b8],
  [0xa6c1, 0xa6d8],
  [0xa6e0, 0xa6eb],
  [0xa6ee, 0xa6f2],
  [0xa6f4, 0xa6f5],
  [0xa7a1, 0xa7c1],
  [0xa7d1, 0xa7f1],
  [0xa840, 0xa87e],
  [0xa880, 0xa895],
  [0xa8a1, 0xa8bb],
  [0xa8bd, 0xa8c0],
  [0xa8c5, 0xa8e9],
  [0xa940, 0xa957],
  [0xa959, 0xa95a],
  [0xa95c, 0xa95c],
  [0xa960, 0xa97e],
  [0xa980, 0xa996],
  [0xa9a4, 0xa9ef],
  [0xaa40, 0xaa7e],
  [0xaa80, 0xaaa0],
  // 0xb0a1 - 0xfafe
  [0xb0a1, 0xb0fe],
  [0xb140, 0xb17e],
  [0xb180, 0xb1fe],
  [0xb240, 0xb27e],
  [0xb280, 0xb2fe],
  [0xb340, 0xb37e],
  [0xb380, 0xb3fe],
  [0xb440, 0xb47e],
  [0xb480, 0xb4fe],
  [0xb540, 0xb57e],
  [0xb580, 0xb5fe],
  [0xb640, 0xb67e],
  [0xb680, 0xb6fe],
  [0xb740, 0xb77e],
  [0xb780, 0xb7fe],
  [0xb840, 0xb87e],
  [0xb880, 0xb8fe],
  [0xb940, 0xb97e],
  [0xb980, 0xb9fe],
  [0xba40, 0xba7e],
  [0xba80, 0xbafe],
  [0xbb40, 0xbb7e],
  [0xbb80, 0xbbfe],
  [0xbc40, 0xbc7e],
  [0xbc80, 0xbcfe],
  [0xbd40, 0xbd7e],
  [0xbd80, 0xbdfe],
  [0xbe40, 0xbe7e],
  [0xbe80, 0xbefe],
  [0xbf40, 0xbf7e],
  [0xbf80, 0xbffe],
  [0xc040, 0xc07e],
  [0xc080, 0xc0fe],
  [0xc140, 0xc17e],
  [0xc180, 0xc1fe],
  [0xc240, 0xc27e],
  [0xc280, 0xc2fe],
  [0xc340, 0xc37e],
  [0xc380, 0xc3fe],
  [0xc440, 0xc47e],
  [0xc480, 0xc4fe],
  [0xc540, 0xc57e],
  [0xc580, 0xc5fe],
  [0xc640, 0xc67e],
  [0xc680, 0xc6fe],
  [0xc740, 0xc77e],
  [0xc780, 0xc7fe],
  [0xc840, 0xc87e],
  [0xc880, 0xc8fe],
  [0xc940, 0xc97e],
  [0xc980, 0xc9fe],
  [0xca40, 0xca7e],
  [0xca80, 0xcafe],
  [0xcb40, 0xcb7e],
  [0xcb80, 0xcbfe],
  [0xcc40, 0xcc7e],
  [0xcc80, 0xccfe],
  [0xcd40, 0xcd7e],
  [0xcd80, 0xcdfe],
  [0xce40, 0xce7e],
  [0xce80, 0xcefe],
  [0xcf40, 0xcf7e],
  [0xcf80, 0xcffe],
  [0xd040, 0xd07e],
  [0xd080, 0xd0fe],
  [0xd140, 0xd17e],
  [0xd180, 0xd1fe],
  [0xd240, 0xd27e],
  [0xd280, 0xd2fe],
  [0xd340, 0xd37e],
  [0xd380, 0xd3fe],
  [0xd440, 0xd47e],
  [0xd480, 0xd4fe],
  [0xd540, 0xd57e],
  [0xd580, 0xd5fe],
  [0xd640, 0xd67e],
  [0xd680, 0xd6fe],
  [0xd740, 0xd77e],
  [0xd780, 0xd7fe],
  [0xd840, 0xd87e],
  [0xd880, 0xd8fe],
  [0xd940, 0xd97e],
  [0xd980, 0xd9fe],
  [0xda40, 0xda7e],
  [0xda80, 0xdafe],
  [0xdb40, 0xdb7e],
  [0xdb80, 0xdbfe],
  [0xdc40, 0xdc7e],
  [0xdc80, 0xdcfe],
  [0xdd40, 0xdd7e],
  [0xdd80, 0xddfe],
  [0xde40, 0xde7e],
  [0xde80, 0xdefe],
  [0xdf40, 0xdf7e],
  [0xdf80, 0xdffe],
  [0xe040, 0xe07e],
  [0xe080, 0xe0fe],
  [0xe140, 0xe17e],
  [0xe180, 0xe1fe],
  [0xe240, 0xe27e],
  [0xe280, 0xe2fe],
  [0xe340, 0xe37e],
  [0xe380, 0xe3fe],
  [0xe440, 0xe47e],
  [0xe480, 0xe4fe],
  [0xe540, 0xe57e],
  [0xe580, 0xe5fe],
  [0xe640, 0xe67e],
  [0xe680, 0xe6fe],
  [0xe740, 0xe77e],
  [0xe780, 0xe7fe],
  [0xe840, 0xe87e],
  [0xe880, 0xe8fe],
  [0xe940, 0xe97e],
  [0xe980, 0xe9fe],
  [0xea40, 0xea7e],
  [0xea80, 0xeafe],
  [0xeb40, 0xeb7e],
  [0xeb80, 0xebfe],
  [0xec40, 0xec7e],
  [0xec80, 0xecfe],
  [0xed40, 0xed7e],
  [0xed80, 0xedfe],
  [0xee40, 0xee7e],
  [0xee80, 0xeefe],
  [0xef40, 0xef7e],
  [0xef80, 0xeffe],
  [0xf040, 0xf07e],
  [0xf080, 0xf0fe],
  [0xf140, 0xf17e],
  [0xf180, 0xf1fe],
  [0xf240, 0xf27e],
  [0xf280, 0xf2fe],
  [0xf340, 0xf37e],
  [0xf380, 0xf3fe],
  [0xf440, 0xf47e],
  [0xf480, 0xf4fe],
  [0xf540, 0xf57e],
  [0xf580, 0xf5fe],
  [0xf640, 0xf67e],
  [0xf680, 0xf6fe],
  [0xf740, 0xf77e],
  [0xf780, 0xf7fe],
  [0xf840, 0xf87e],
  [0xf880, 0xf8a0],
  [0xf940, 0xf97e],
  [0xf980, 0xf9a0],
  [0xfa40, 0xfa7e],
  [0xfa80, 0xfaa0]
]
nuintun commented 1 year ago
const GB2312 = getEncodingMapping(
  'gb2312',
  [0xa1a1, 0xa1fe],
  [0xa2a1, 0xa2aa],
  [0xa2b1, 0xa2e3],
  [0xa2e5, 0xa2ee],
  [0xa2f1, 0xa2fc],
  [0xa3a1, 0xa3fe],
  [0xa4a1, 0xa4f3],
  [0xa5a1, 0xa5f6],
  [0xa6a1, 0xa6b8],
  [0xa6c1, 0xa6d8],
  [0xa6e0, 0xa6eb],
  [0xa6ee, 0xa6f2],
  [0xa6f4, 0xa6f5],
  [0xa7a1, 0xa7c1],
  [0xa7d1, 0xa7f1],
  [0xa840, 0xa87e],
  [0xa880, 0xa895],
  [0xa8a1, 0xa8bb],
  [0xa8bd, 0xa8c0],
  [0xa8c5, 0xa8e9],
  [0xa940, 0xa957],
  [0xa959, 0xa95a],
  [0xa95c, 0xa95c],
  [0xa960, 0xa97e],
  [0xa980, 0xa996],
  [0xa9a4, 0xa9ef],
  [0xaa40, 0xaa7e],
  [0xaa80, 0xaaa0],
  [0xb0a1, 0xb0fe],
  ...getSerialRanges(0xb140, 0xf7fe, [0, 62, 64, 190]),
  ...getSerialRanges(0xf840, 0xfaa0, [0, 62, 64, 96])
);
nuintun commented 1 year ago

https://www.khngai.com/chinese/charmap/tblgb.php