@mavogel/awscdk-rootmail 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/.jsii +3 -3
  2. package/lib/rootmail.js +1 -1
  3. package/lib/ses-receive.js +1 -1
  4. package/node_modules/@aws-sdk/checksums/package.json +2 -2
  5. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +1 -1
  6. package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +3 -3
  7. package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
  8. package/node_modules/@aws-sdk/client-route-53/package.json +3 -3
  9. package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +38 -15
  10. package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +7 -0
  11. package/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +28 -14
  12. package/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +3 -0
  13. package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateMultipartUploadCommand.d.ts +3 -0
  14. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +1 -1
  15. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +3 -3
  16. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +3 -0
  17. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +4 -0
  18. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectRetentionCommand.d.ts +5 -0
  19. package/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +3 -0
  20. package/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +1 -1
  21. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +1 -1
  22. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +3 -3
  23. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +3 -0
  24. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +4 -0
  25. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectRetentionCommand.d.ts +5 -0
  26. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutPublicAccessBlockCommand.d.ts +1 -1
  27. package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +15 -0
  28. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +186 -49
  29. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +43 -1
  30. package/node_modules/@aws-sdk/client-s3/dist-types/schemas/schemas_0.d.ts +1 -0
  31. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutPublicAccessBlockCommand.d.ts +1 -1
  32. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +8 -0
  33. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +23 -7
  34. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +14 -1
  35. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/schemas/schemas_0.d.ts +1 -0
  36. package/node_modules/@aws-sdk/client-s3/package.json +6 -6
  37. package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
  38. package/node_modules/@aws-sdk/client-ses/package.json +3 -3
  39. package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
  40. package/node_modules/@aws-sdk/client-ssm/package.json +3 -3
  41. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
  42. package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  43. package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  44. package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  45. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  46. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  47. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  48. package/node_modules/@aws-sdk/core/package.json +1 -1
  49. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  50. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  51. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  52. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  53. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  54. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  55. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  56. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  57. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
  58. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  59. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  60. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  61. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  62. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  63. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  64. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  65. package/node_modules/@zone-eu/mailsplit/package.json +3 -3
  66. package/node_modules/encoding-japanese/LICENSE +25 -1
  67. package/node_modules/encoding-japanese/README.md +86 -51
  68. package/node_modules/encoding-japanese/encoding.js +107 -78
  69. package/node_modules/encoding-japanese/encoding.min.js +2 -2
  70. package/node_modules/encoding-japanese/index.d.ts +102 -0
  71. package/node_modules/encoding-japanese/package.json +26 -17
  72. package/node_modules/encoding-japanese/src/encoding-convert.js +67 -58
  73. package/node_modules/encoding-japanese/src/encoding-table.js +1 -0
  74. package/node_modules/encoding-japanese/src/index.js +1 -1
  75. package/node_modules/encoding-japanese/src/kana-case-table.js +1 -1
  76. package/node_modules/encoding-japanese/src/utf8-to-jis-alias-table.js +14 -0
  77. package/node_modules/encoding-japanese/src/utf8-to-jis-table.js +6 -5
  78. package/node_modules/encoding-japanese/src/utf8-to-jisx0212-table.js +7 -5
  79. package/node_modules/libmime/CHANGELOG.md +7 -0
  80. package/node_modules/libmime/package.json +2 -2
  81. package/node_modules/mailparser/.release-please-manifest.json +1 -1
  82. package/node_modules/mailparser/CHANGELOG.md +42 -0
  83. package/node_modules/mailparser/package.json +5 -5
  84. package/node_modules/nodemailer/CHANGELOG.md +83 -0
  85. package/node_modules/nodemailer/dist/cjs/addressparser/index.d.ts +1 -3
  86. package/node_modules/nodemailer/dist/cjs/addressparser/index.js +176 -13
  87. package/node_modules/nodemailer/dist/cjs/base64/index.d.ts +2 -6
  88. package/node_modules/nodemailer/dist/cjs/base64/index.js +2 -0
  89. package/node_modules/nodemailer/dist/cjs/dkim/index.d.ts +4 -4
  90. package/node_modules/nodemailer/dist/cjs/dkim/message-parser.d.ts +1 -3
  91. package/node_modules/nodemailer/dist/cjs/dkim/message-parser.js +14 -5
  92. package/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.d.ts +3 -22
  93. package/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.js +5 -0
  94. package/node_modules/nodemailer/dist/cjs/dkim/sign.d.ts +5 -5
  95. package/node_modules/nodemailer/dist/cjs/errors.d.ts +8 -8
  96. package/node_modules/nodemailer/dist/cjs/fetch/cookies.d.ts +12 -10
  97. package/node_modules/nodemailer/dist/cjs/fetch/cookies.js +28 -14
  98. package/node_modules/nodemailer/dist/cjs/fetch/index.d.ts +15 -15
  99. package/node_modules/nodemailer/dist/cjs/json-transport/index.d.ts +2 -2
  100. package/node_modules/nodemailer/dist/cjs/mail-composer/index.d.ts +49 -104
  101. package/node_modules/nodemailer/dist/cjs/mail-composer/index.js +14 -3
  102. package/node_modules/nodemailer/dist/cjs/mailer/index.d.ts +21 -28
  103. package/node_modules/nodemailer/dist/cjs/mailer/index.js +19 -5
  104. package/node_modules/nodemailer/dist/cjs/mailer/mail-message.d.ts +8 -12
  105. package/node_modules/nodemailer/dist/cjs/mailer/mail-message.js +4 -1
  106. package/node_modules/nodemailer/dist/cjs/mime-funcs/index.d.ts +1 -1
  107. package/node_modules/nodemailer/dist/cjs/mime-funcs/index.js +4 -1
  108. package/node_modules/nodemailer/dist/cjs/mime-node/index.d.ts +37 -191
  109. package/node_modules/nodemailer/dist/cjs/mime-node/index.js +82 -12
  110. package/node_modules/nodemailer/dist/cjs/mime-node/last-newline.d.ts +1 -3
  111. package/node_modules/nodemailer/dist/cjs/mime-node/last-newline.js +2 -0
  112. package/node_modules/nodemailer/dist/cjs/mime-node/le-unix.d.ts +1 -5
  113. package/node_modules/nodemailer/dist/cjs/mime-node/le-unix.js +1 -0
  114. package/node_modules/nodemailer/dist/cjs/mime-node/le-windows.d.ts +1 -5
  115. package/node_modules/nodemailer/dist/cjs/mime-node/le-windows.js +1 -0
  116. package/node_modules/nodemailer/dist/cjs/nodemailer.d.ts +2 -2
  117. package/node_modules/nodemailer/dist/cjs/package-info.d.ts +1 -1
  118. package/node_modules/nodemailer/dist/cjs/package-info.js +1 -1
  119. package/node_modules/nodemailer/dist/cjs/qp/index.d.ts +2 -5
  120. package/node_modules/nodemailer/dist/cjs/qp/index.js +2 -0
  121. package/node_modules/nodemailer/dist/cjs/sendmail-transport/index.d.ts +4 -6
  122. package/node_modules/nodemailer/dist/cjs/ses-transport/index.d.ts +2 -2
  123. package/node_modules/nodemailer/dist/cjs/ses-transport/index.js +5 -1
  124. package/node_modules/nodemailer/dist/cjs/shared/index.d.ts +31 -37
  125. package/node_modules/nodemailer/dist/cjs/shared/index.js +19 -7
  126. package/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.d.ts +1 -9
  127. package/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.js +2 -0
  128. package/node_modules/nodemailer/dist/cjs/smtp-connection/http-proxy-client.d.ts +1 -1
  129. package/node_modules/nodemailer/dist/cjs/smtp-connection/index.d.ts +65 -403
  130. package/node_modules/nodemailer/dist/cjs/smtp-connection/index.js +99 -19
  131. package/node_modules/nodemailer/dist/cjs/smtp-pool/index.d.ts +8 -46
  132. package/node_modules/nodemailer/dist/cjs/smtp-pool/index.js +13 -2
  133. package/node_modules/nodemailer/dist/cjs/smtp-pool/pool-resource.d.ts +2 -4
  134. package/node_modules/nodemailer/dist/cjs/smtp-transport/index.d.ts +16 -16
  135. package/node_modules/nodemailer/dist/cjs/stream-transport/index.d.ts +3 -3
  136. package/node_modules/nodemailer/dist/cjs/well-known/index.d.ts +9 -9
  137. package/node_modules/nodemailer/dist/cjs/well-known/services.js +2 -0
  138. package/node_modules/nodemailer/dist/cjs/xoauth2/index.d.ts +18 -18
  139. package/node_modules/nodemailer/dist/esm/addressparser/index.d.ts +1 -3
  140. package/node_modules/nodemailer/dist/esm/addressparser/index.js +176 -13
  141. package/node_modules/nodemailer/dist/esm/base64/index.d.ts +2 -6
  142. package/node_modules/nodemailer/dist/esm/base64/index.js +2 -0
  143. package/node_modules/nodemailer/dist/esm/dkim/index.d.ts +4 -4
  144. package/node_modules/nodemailer/dist/esm/dkim/message-parser.d.ts +1 -3
  145. package/node_modules/nodemailer/dist/esm/dkim/message-parser.js +14 -5
  146. package/node_modules/nodemailer/dist/esm/dkim/relaxed-body.d.ts +3 -22
  147. package/node_modules/nodemailer/dist/esm/dkim/relaxed-body.js +5 -0
  148. package/node_modules/nodemailer/dist/esm/dkim/sign.d.ts +5 -5
  149. package/node_modules/nodemailer/dist/esm/errors.d.ts +8 -8
  150. package/node_modules/nodemailer/dist/esm/fetch/cookies.d.ts +12 -10
  151. package/node_modules/nodemailer/dist/esm/fetch/cookies.js +25 -14
  152. package/node_modules/nodemailer/dist/esm/fetch/index.d.ts +15 -15
  153. package/node_modules/nodemailer/dist/esm/json-transport/index.d.ts +2 -2
  154. package/node_modules/nodemailer/dist/esm/mail-composer/index.d.ts +49 -104
  155. package/node_modules/nodemailer/dist/esm/mail-composer/index.js +14 -3
  156. package/node_modules/nodemailer/dist/esm/mailer/index.d.ts +21 -28
  157. package/node_modules/nodemailer/dist/esm/mailer/index.js +19 -5
  158. package/node_modules/nodemailer/dist/esm/mailer/mail-message.d.ts +8 -12
  159. package/node_modules/nodemailer/dist/esm/mailer/mail-message.js +4 -1
  160. package/node_modules/nodemailer/dist/esm/mime-funcs/index.d.ts +1 -1
  161. package/node_modules/nodemailer/dist/esm/mime-funcs/index.js +4 -1
  162. package/node_modules/nodemailer/dist/esm/mime-node/index.d.ts +37 -191
  163. package/node_modules/nodemailer/dist/esm/mime-node/index.js +82 -12
  164. package/node_modules/nodemailer/dist/esm/mime-node/last-newline.d.ts +1 -3
  165. package/node_modules/nodemailer/dist/esm/mime-node/last-newline.js +2 -0
  166. package/node_modules/nodemailer/dist/esm/mime-node/le-unix.d.ts +1 -5
  167. package/node_modules/nodemailer/dist/esm/mime-node/le-unix.js +1 -0
  168. package/node_modules/nodemailer/dist/esm/mime-node/le-windows.d.ts +1 -5
  169. package/node_modules/nodemailer/dist/esm/mime-node/le-windows.js +1 -0
  170. package/node_modules/nodemailer/dist/esm/nodemailer.d.ts +2 -2
  171. package/node_modules/nodemailer/dist/esm/package-info.d.ts +1 -1
  172. package/node_modules/nodemailer/dist/esm/package-info.js +1 -1
  173. package/node_modules/nodemailer/dist/esm/qp/index.d.ts +2 -5
  174. package/node_modules/nodemailer/dist/esm/qp/index.js +2 -0
  175. package/node_modules/nodemailer/dist/esm/sendmail-transport/index.d.ts +4 -6
  176. package/node_modules/nodemailer/dist/esm/ses-transport/index.d.ts +2 -2
  177. package/node_modules/nodemailer/dist/esm/ses-transport/index.js +5 -1
  178. package/node_modules/nodemailer/dist/esm/shared/index.d.ts +31 -37
  179. package/node_modules/nodemailer/dist/esm/shared/index.js +19 -7
  180. package/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.d.ts +1 -9
  181. package/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.js +2 -0
  182. package/node_modules/nodemailer/dist/esm/smtp-connection/http-proxy-client.d.ts +1 -1
  183. package/node_modules/nodemailer/dist/esm/smtp-connection/index.d.ts +65 -403
  184. package/node_modules/nodemailer/dist/esm/smtp-connection/index.js +99 -19
  185. package/node_modules/nodemailer/dist/esm/smtp-pool/index.d.ts +8 -46
  186. package/node_modules/nodemailer/dist/esm/smtp-pool/index.js +13 -2
  187. package/node_modules/nodemailer/dist/esm/smtp-pool/pool-resource.d.ts +2 -4
  188. package/node_modules/nodemailer/dist/esm/smtp-transport/index.d.ts +16 -16
  189. package/node_modules/nodemailer/dist/esm/stream-transport/index.d.ts +3 -3
  190. package/node_modules/nodemailer/dist/esm/well-known/index.d.ts +9 -9
  191. package/node_modules/nodemailer/dist/esm/well-known/services.js +2 -0
  192. package/node_modules/nodemailer/dist/esm/xoauth2/index.d.ts +18 -18
  193. package/node_modules/nodemailer/dist/well-known/services.json +2 -2
  194. package/node_modules/nodemailer/package.json +6 -6
  195. package/package.json +1 -1
@@ -3,44 +3,48 @@ encoding.js
3
3
 
4
4
  [![NPM Version](https://img.shields.io/npm/v/encoding-japanese.svg)](https://www.npmjs.com/package/encoding-japanese)
5
5
  [![GitHub Actions Build Status](https://github.com/polygonplanet/encoding.js/actions/workflows/ci.yml/badge.svg)](https://github.com/polygonplanet/encoding.js/actions)
6
- [![GitHub License](https://img.shields.io/github/license/polygonplanet/encoding.js.svg)](https://github.com/polygonplanet/encoding.js/blob/master/LICENSE)
6
+ [![License](https://img.shields.io/npm/l/encoding-japanese.svg)](https://github.com/polygonplanet/encoding.js/blob/master/LICENSE)
7
7
 
8
- Convert and detect character encoding in JavaScript.
8
+ Convert and detect character encodings in JavaScript.
9
9
 
10
10
  [**README (日本語)**](README_ja.md)
11
11
 
12
12
  ## Table of contents
13
13
 
14
14
  - [Features](#features)
15
- * [How to Use Character Encoding in Strings?](#how-to-use-character-encoding-in-strings)
15
+ * [How to Handle Encoded Data as Strings?](#how-to-handle-encoded-data-as-strings)
16
16
  - [Installation](#installation)
17
17
  * [npm](#npm)
18
18
  + [TypeScript](#typescript)
19
19
  * [Browser (standalone)](#browser-standalone)
20
20
  * [CDN](#cdn)
21
21
  - [Supported encodings](#supported-encodings)
22
+ * [About `SJIS`](#about-sjis)
22
23
  * [About `UNICODE`](#about-unicode)
23
24
  - [Example usage](#example-usage)
24
25
  - [Demo](#demo)
26
+ * [Playground](#playground)
27
+ * [Sample file encoding conversion demo](#sample-file-encoding-conversion-demo)
28
+ * [User-selected file encoding conversion and detection demo](#user-selected-file-encoding-conversion-and-detection-demo)
25
29
  - [API](#api)
26
- * [detect : Detects character encoding](#encodingdetect-data-encodings)
27
- * [convert : Converts character encoding](#encodingconvert-data-to-from)
28
- + [Specify conversion options to the argument `to` as an object](#specify-conversion-options-to-the-argument-to-as-an-object)
30
+ * [`detect` : Detects character encoding](#encodingdetect-data-encodings)
31
+ * [`convert` : Converts character encoding](#encodingconvert-data-to-from)
32
+ + [Specifying conversion options with an object](#specifying-conversion-options-with-an-object)
29
33
  + [Specify the return type by the `type` option](#specify-the-return-type-by-the-type-option)
30
34
  + [Specify handling for unrepresentable characters](#specify-handling-for-unrepresentable-characters)
31
35
  + [Replacing characters with HTML entities when they cannot be represented](#replacing-characters-with-html-entities-when-they-cannot-be-represented)
32
36
  + [Ignoring characters when they cannot be represented](#ignoring-characters-when-they-cannot-be-represented)
33
37
  + [Throwing an Error when they cannot be represented](#throwing-an-error-when-they-cannot-be-represented)
34
38
  + [Specify BOM in UTF-16](#specify-bom-in-utf-16)
35
- * [urlEncode : Encodes to percent-encoded string](#encodingurlencode-data)
36
- * [urlDecode : Decodes from percent-encoded string](#encodingurldecode-string)
37
- * [base64Encode : Encodes to Base64 formatted string](#encodingbase64encode-data)
38
- * [base64Decode : Decodes from Base64 formatted string](#encodingbase64decode-string)
39
- * [codeToString : Converts character code array to string](#encodingcodetostring-code)
40
- * [stringToCode : Converts string to character code array](#encodingstringtocode-string)
39
+ * [`urlEncode` : Encodes to percent-encoded string](#encodingurlencode-data)
40
+ * [`urlDecode` : Decodes from percent-encoded string](#encodingurldecode-string)
41
+ * [`base64Encode` : Encodes to Base64 formatted string](#encodingbase64encode-data)
42
+ * [`base64Decode` : Decodes from Base64 formatted string](#encodingbase64decode-string)
43
+ * [`codeToString` : Converts character code array to string](#encodingcodetostring-code)
44
+ * [`stringToCode` : Converts string to character code array](#encodingstringtocode-string)
41
45
  * [Japanese Zenkaku/Hankaku conversion](#japanese-zenkakuhankaku-conversion)
42
46
  - [Other examples](#other-examples)
43
- * [Example using the `fetch API` and Typed Arrays (Uint8Array)](#example-using-the-fetch-api-and-typed-arrays-uint8array)
47
+ * [Example using the `Fetch API` and Typed Arrays (Uint8Array)](#example-using-the-fetch-api-and-typed-arrays-uint8array)
44
48
  * [Convert encoding for file using the File APIs](#convert-encoding-for-file-using-the-file-apis)
45
49
  - [Contributing](#contributing)
46
50
  - [License](#license)
@@ -52,22 +56,22 @@ supporting both Japanese character encodings (`Shift_JIS`, `EUC-JP`, `ISO-2022-J
52
56
 
53
57
  Since JavaScript string values are internally encoded as UTF-16 code units
54
58
  ([ref: ECMAScript® 2019 Language Specification - 6.1.4 The String Type](https://www.ecma-international.org/ecma-262/10.0/index.html#sec-ecmascript-language-types-string-type)),
55
- they cannot directly handle other character encodings as strings. However, encoding.js overcomes this limitation by treating these encodings as arrays instead of strings,
56
- enabling the conversion between different character sets.
59
+ data in other encodings cannot be handled directly as JavaScript strings.
60
+ encoding.js works around this limitation by representing encoded data as arrays of numeric code values instead of strings, enabling conversion between different character encodings.
61
+ For example, `[130, 160]` represents "あ" in Shift_JIS.
57
62
 
58
- Each character encoding is represented as an array of numbers corresponding to character code values, for example, `[130, 160]` represents "あ" in Shift_JIS.
63
+ These character code arrays can also be passed as typed arrays (such as `Uint8Array`) or as Node.js `Buffer` objects.
59
64
 
60
- The array of character codes used in its methods can also be utilized with TypedArray objects, such as `Uint8Array`, or with `Buffer` in Node.js.
61
-
62
- ### How to Use Character Encoding in Strings?
65
+ ### How to Handle Encoded Data as Strings?
63
66
 
64
67
  Numeric arrays of character codes can be converted to strings using methods such as [`Encoding.codeToString`](#encodingcodetostring-code).
65
68
  However, due to the JavaScript specifications mentioned above, some character encodings may not be handled properly when converted directly to strings.
66
69
 
67
- If you prefer to use strings instead of numeric arrays, you can convert them to percent-encoded strings,
68
- such as `'%82%A0'`, using [`Encoding.urlEncode`](#encodingurlencode-data) and [`Encoding.urlDecode`](#encodingurldecode-string) for passing to other resources.
69
- Similarly, [`Encoding.base64Encode`](#encodingbase64encode-data) and [`Encoding.base64Decode`](#encodingbase64decode-string) allow for encoding and decoding to and from base64,
70
- which can then be passed as strings.
70
+ If you need a string representation, [`Encoding.urlEncode`](#encodingurlencode-data) and
71
+ [`Encoding.urlDecode`](#encodingurldecode-string) can convert numeric arrays to and from
72
+ percent-encoded strings such as `'%82%A0'`.
73
+ Similarly, [`Encoding.base64Encode`](#encodingbase64encode-data) and
74
+ [`Encoding.base64Decode`](#encodingbase64decode-string) can convert numeric arrays to and from Base64 strings.
71
75
 
72
76
  ## Installation
73
77
 
@@ -121,7 +125,7 @@ When the script is loaded, the object `Encoding` is defined in the global scope
121
125
  You can use encoding.js (package name: `encoding-japanese`) directly from a CDN via a script tag:
122
126
 
123
127
  ```html
124
- <script src="https://unpkg.com/encoding-japanese@2.3.0/encoding.min.js"></script>
128
+ <script src="https://unpkg.com/encoding-japanese@2.4.0/encoding.min.js"></script>
125
129
  ```
126
130
 
127
131
  In this example we use [unpkg](https://unpkg.com/encoding-japanese/), but you can use any CDN that provides npm packages,
@@ -135,7 +139,7 @@ for example [cdnjs](https://cdnjs.com/libraries/encoding-japanese) or [jsDelivr]
135
139
  |BINARY |✓ | |(Binary string. Code point range: `0-255`)|
136
140
  |EUCJP |✓ |✓ |EUC-JP|
137
141
  |JIS |✓ |✓ |ISO-2022-JP|
138
- |SJIS |✓ |✓ |Shift_JIS|
142
+ |SJIS |✓ |✓ |Shift_JIS, Windows-31J (*See [About `SJIS`](#about-sjis) below)|
139
143
  |UTF8 |✓ |✓ |UTF-8|
140
144
  |UTF16 |✓ |✓ |UTF-16|
141
145
  |UTF16BE |✓ |✓ |UTF-16BE (big-endian)|
@@ -143,18 +147,40 @@ for example [cdnjs](https://cdnjs.com/libraries/encoding-japanese) or [jsDelivr]
143
147
  |UTF32 |✓ | |UTF-32|
144
148
  |UNICODE |✓ |✓ |(JavaScript string. *See [About `UNICODE`](#about-unicode) below) |
145
149
 
150
+ ### About `SJIS`
151
+
152
+ Strictly speaking, Shift_JIS and CP932 (also known as Windows-31J, MS932, SJIS-win, and other names) are different character encodings.
153
+ Following common usage, encoding.js defines encodings in the Shift_JIS family as `SJIS`.
154
+
155
+ `SJIS` covers CP932, an extension of Shift_JIS.
156
+ In addition to JIS X 0201 and JIS X 0208, it supports the following CP932 extension areas:
157
+
158
+ |Area |Code range |[`detect()`](#encodingdetect-data-encodings)|[`convert()`](#encodingconvert-data-to-from)|
159
+ |:-----------------------------------|:------------------|:----:|:----:|
160
+ |NEC special characters |`0x8740` - `0x879C`|✓ |✓ |
161
+ |NEC-selected IBM extended characters|`0xED40` - `0xEEFC`|✓ |✓ |
162
+ |User-defined area (外字 / Gaiji) |`0xF040` - `0xF9FC`|✓ | |
163
+ |IBM extended characters |`0xFA40` - `0xFC4B`|✓ |✓ |
164
+
165
+ The user-defined area is detected as `SJIS`, but it cannot be converted because its character assignments are not defined by any standard.
166
+ During conversion, characters in this area are replaced with `?` (U+003F).
167
+
146
168
  ### About `UNICODE`
147
169
 
148
- In encoding.js, `UNICODE` is defined as the internal character encoding that JavaScript strings (JavaScript string objects) can handle directly.
170
+ In encoding.js, `UNICODE` represents JavaScript strings (e.g., `"hello"` or `"こんにちは"`)
171
+ and is defined as the internal character representation used by JavaScript.
149
172
 
150
173
  As mentioned in the [Features](#features) section, JavaScript strings are internally encoded using UTF-16 code units.
151
- This means that other character encodings cannot be directly handled without conversion.
152
- Therefore, when converting to a character encoding that is properly representable in JavaScript, you should specify `UNICODE`.
174
+ This means other character encodings cannot be directly handled without conversion.
175
+ Therefore, specify `UNICODE` when converting data to a form that can be properly represented as a JavaScript string.
153
176
 
154
- (Note: Even if the HTML file's encoding is UTF-8, you should specify `UNICODE` instead of `UTF8` when processing the encoding in JavaScript.)
177
+ (Note: Even if your HTML file is UTF-8 encoded, you should specify `UNICODE` instead of `UTF8` when handling data as JavaScript strings.)
155
178
 
156
- When using [`Encoding.convert`](#encodingconvert-data-to-from), if you specify a character encoding other than `UNICODE` (such as `UTF8` or `SJIS`), the values in the returned character code array will range from `0-255`.
157
- However, if you specify `UNICODE`, the values will range from `0-65535`, which corresponds to the range of values returned by `String.prototype.charCodeAt()` (Code Units).
179
+ When using [`Encoding.convert`](#encodingconvert-data-to-from),
180
+ if you specify a character encoding other than `UNICODE` (such as `UTF8` or `SJIS`),
181
+ the values in the returned character code array will range from `0` to `255` (byte array).
182
+ However, if you specify `UNICODE`, the values will range from `0` to `65535`,
183
+ which corresponds to the range of values returned by `String.prototype.charCodeAt()` (UTF-16 code units).
158
184
 
159
185
  ## Example usage
160
186
 
@@ -212,9 +238,18 @@ console.log(Encoding.codeToString(unicodeArray));
212
238
 
213
239
  ## Demo
214
240
 
215
- * [**Playground** for testing character encoding conversion and detection](https://polygonplanet.github.io/encoding.js/tests/playground.html)
216
- * [**Test run** for reading sample files and converting character encodings](https://polygonplanet.github.io/encoding.js/tests/encoding-test.html)
217
- * [**Demo** for converting and detecting character encoding by specifying a file](https://polygonplanet.github.io/encoding.js/tests/detect-file-encoding.html)
241
+ ### Playground
242
+
243
+ Try character encoding conversion and detection directly in your browser.
244
+ [Open the Playground](https://polygonplanet.github.io/encoding.js/tests/playground.html)
245
+
246
+ ### Sample file encoding conversion demo
247
+
248
+ [Try converting sample files encoded in Shift_JIS, EUC-JP, and other encodings](https://polygonplanet.github.io/encoding.js/tests/encoding-test.html)
249
+
250
+ ### User-selected file encoding conversion and detection demo
251
+
252
+ [Try converting and detecting the character encoding of a selected file](https://polygonplanet.github.io/encoding.js/tests/detect-file-encoding.html)
218
253
 
219
254
  ----
220
255
 
@@ -259,7 +294,7 @@ console.log(`Encoding is ${detectedEncoding}`); // 'Encoding is SJIS'
259
294
  ```
260
295
 
261
296
  Example of using the `encodings` argument to specify the character encoding to be detected.
262
- This returns a string detected encoding if the specified encoding matches, or `false` otherwise:
297
+ This returns the detected encoding name if the specified encoding matches, or `false` otherwise:
263
298
 
264
299
  ```javascript
265
300
  const sjisArray = [130, 168, 130, 205, 130, 230]; // 'おはよ' array in SJIS
@@ -291,7 +326,7 @@ Converts the character encoding of the given data.
291
326
 
292
327
  #### Parameters
293
328
 
294
- * **data** *(Array\<number\>|TypedArray|Buffer|string)* : The code array or string to convert character encoding.
329
+ * **data** *(Array\<number\>|TypedArray|Buffer|string)* : The code array or string to be converted.
295
330
  * **to** *(string|Object)* : The character encoding name of the conversion destination as a string, or conversion options as an object.
296
331
  * **\[from\]** *(string|Array\<string\>)* : (Optional) The character encoding name of the conversion source as a string,
297
332
  or an array of encoding names. Detects automatically if this argument is omitted or `AUTO` is specified.
@@ -312,7 +347,7 @@ const sjisArray = Encoding.convert(utf8Array, 'SJIS', 'UTF8');
312
347
  console.log(sjisArray); // [130, 160] ('あ' in SJIS)
313
348
  ```
314
349
 
315
- TypedArray such as `Uint8Array`, and `Buffer` of Node.js can be converted in the same usage:
350
+ Typed arrays, such as `Uint8Array`, and Node.js `Buffer` objects can be passed in the same way:
316
351
 
317
352
  ```javascript
318
353
  const utf8Array = new Uint8Array([227, 129, 130]);
@@ -325,14 +360,14 @@ Converts character encoding by auto-detecting the encoding name of the source:
325
360
  // The character encoding is automatically detected when the argument `from` is omitted
326
361
  const utf8Array = [227, 129, 130];
327
362
  let sjisArray = Encoding.convert(utf8Array, 'SJIS');
328
- // Or explicitly specify 'AUTO' to auto-detecting
363
+ // You can also explicitly specify 'AUTO' to enable auto-detection
329
364
  sjisArray = Encoding.convert(utf8Array, 'SJIS', 'AUTO');
330
365
  ```
331
366
 
332
- #### Specify conversion options to the argument `to` as an object
367
+ #### Specifying conversion options with an object
333
368
 
334
- You can pass the second argument `to` as an object for improving readability.
335
- Also, the following options such as `type`, `fallback`, and `bom` must be specified with an object.
369
+ For readability, the second argument `to` can be passed as an options object.
370
+ Options such as `type`, `fallback`, and `bom` must be specified this way.
336
371
 
337
372
  ```javascript
338
373
  const utf8Array = [227, 129, 130];
@@ -345,7 +380,7 @@ const sjisArray = Encoding.convert(utf8Array, {
345
380
  #### Specify the return type by the `type` option
346
381
 
347
382
  `convert` returns an array by default, but you can change the return type by specifying the `type` option.
348
- Also, if the argument `data` is passed as a string and the` type` option is not specified, then `type` ='string' is assumed (returns as a string).
383
+ If `data` is a string and `type` is omitted, `type: 'string'` is assumed and the result is returned as a string.
349
384
 
350
385
  ```javascript
351
386
  const sjisArray = [130, 168, 130, 205, 130, 230]; // 'おはよ' array in SJIS
@@ -360,8 +395,8 @@ console.log(unicodeString); // 'おはよ'
360
395
  The following `type` options are supported.
361
396
 
362
397
  * **string** : Return as a string.
363
- * **arraybuffer** : Return as an ArrayBuffer (Actually returns a `Uint16Array` due to historical reasons).
364
- * **array** : Return as an Array. (*default*)
398
+ * **arraybuffer** : Return a `Uint16Array` (the option name is retained for historical reasons).
399
+ * **array** : Return as an Array. (*default*)
365
400
 
366
401
  `type: 'string'` can be used as a shorthand for converting a code array to a string,
367
402
  as performed by [`Encoding.codeToString`](#encodingcodetostring-code).
@@ -471,7 +506,7 @@ const utf16Array = Encoding.convert(utf8Array, {
471
506
  });
472
507
  ```
473
508
 
474
- `UTF16` byte order is big-endian by default.
509
+ The default byte order for `UTF16` is big-endian.
475
510
  If you want to convert as little-endian, specify the `{ bom: 'LE' }` option.
476
511
 
477
512
  ```javascript
@@ -582,7 +617,7 @@ Decodes a Base64 encoded string to a numeric character code array.
582
617
 
583
618
  #### Return value
584
619
 
585
- *(Array\<number\>)* : Returns a Base64 decoded numeric character code array.
620
+ *(Array\<number\>)* : Returns the decoded numeric character code array.
586
621
 
587
622
  #### Examples
588
623
 
@@ -601,7 +636,7 @@ console.log(decodedArray); // [130, 177, 130, 241, 130, 201, 130, 191, 130, 205]
601
636
 
602
637
  ### Encoding.codeToString (code)
603
638
 
604
- Converts a numeric character code array to string.
639
+ Converts a numeric character code array to a string.
605
640
 
606
641
  #### Parameters
607
642
 
@@ -652,8 +687,8 @@ console.log(unicodeArray); // [12362, 12399, 12424]
652
687
 
653
688
  ### Japanese Zenkaku/Hankaku conversion
654
689
 
655
- The following methods convert Japanese full-width (zenkaku) and half-width (hankaku) characters,
656
- suitable for use with `UNICODE` strings or numeric character code arrays of `UNICODE`.
690
+ The following methods convert Japanese full-width (zenkaku) and half-width (hankaku) characters.
691
+ They accept either `UNICODE` strings or numeric arrays of `UNICODE` code units.
657
692
 
658
693
  Returns a converted string if the argument `data` is a string.
659
694
  Returns a numeric character code array if the argument `data` is a code array.
@@ -664,8 +699,8 @@ Returns a numeric character code array if the argument `data` is a code array.
664
699
  - **Encoding.toKatakanaCase (data)** : Converts full-width hiragana to full-width katakana.
665
700
  - **Encoding.toHankanaCase (data)** : Converts full-width katakana to half-width katakana.
666
701
  - **Encoding.toZenkanaCase (data)** : Converts half-width katakana to full-width katakana.
667
- - **Encoding.toHankakuSpace (data)** : Converts the em space (U+3000) to the single space (U+0020).
668
- - **Encoding.toZenkakuSpace (data)** : Converts the single space (U+0020) to the em space (U+3000).
702
+ - **Encoding.toHankakuSpace (data)** : Converts the ideographic space (U+3000) to an ASCII space (U+0020).
703
+ - **Encoding.toZenkakuSpace (data)** : Converts an ASCII space (U+0020) to the ideographic space (U+3000).
669
704
 
670
705
  #### Parameters
671
706