Commit 0ebf839
src: use CP_UTF8 for wide file names on win32
`src/node_modules.cc` needs to be consistent with `src/node_file.cc` in
how it translates the utf8 strings to `std::wstring` otherwise we might
end up in situation where we can read the source code of imported
package from disk, but fail to recognize that it is an ESM (or CJS) and
cause runtime errors. This type of error is possible on Windows when the
path contains unicode characters and "Language for non-Unicode programs"
is set to "Chinese (Traditional, Taiwan)".
See: #58768
PR-URL: #60575
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>1 parent a31ad37 commit 0ebf839Copy full SHA for 0ebf839
File tree
Expand file treeCollapse file tree
5 files changed
+88
-72
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
5 files changed
+88
-72
lines changedOpen diff view settings
Collapse file
+2-4Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
232 | 232 | |
233 | 233 | |
234 | 234 | |
235 | | - |
236 | | - |
237 | | - |
238 | | - |
| 235 | + |
| 236 | + |
239 | 237 | |
240 | 238 | |
241 | 239 | |
|
Collapse file
+8-44Lines changed: 8 additions & 44 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3184 | 3184 | |
3185 | 3185 | |
3186 | 3186 | |
3187 | | - |
3188 | | - |
3189 | | - |
3190 | | - |
3191 | | - |
3192 | | - |
3193 | | - |
3194 | | - |
3195 | | - |
3196 | | - |
3197 | | - |
3198 | | - |
3199 | | - |
3200 | | - |
3201 | | - |
3202 | | - |
3203 | | - |
3204 | | - |
3205 | | - |
3206 | | - |
3207 | | - |
3208 | | - |
3209 | | - |
3210 | | - |
3211 | | - |
3212 | | - |
3213 | | - |
3214 | | - |
3215 | | - |
3216 | | - |
3217 | | - |
3218 | | - |
3219 | | - |
3220 | | - |
3221 | | - |
3222 | | - |
3223 | 3187 | |
3224 | 3188 | |
3225 | 3189 | |
| ||
3232 | 3196 | |
3233 | 3197 | |
3234 | 3198 | |
3235 | | - |
| 3199 | + |
3236 | 3200 | |
3237 | 3201 | |
3238 | 3202 | |
3239 | 3203 | |
3240 | 3204 | |
3241 | 3205 | |
3242 | 3206 | |
3243 | | - |
| 3207 | + |
3244 | 3208 | |
3245 | 3209 | |
3246 | 3210 | |
| ||
3269 | 3233 | |
3270 | 3234 | |
3271 | 3235 | |
3272 | | - |
3273 | | - |
| 3236 | + |
| 3237 | + |
3274 | 3238 | |
3275 | 3239 | |
3276 | 3240 | |
| ||
3365 | 3329 | |
3366 | 3330 | |
3367 | 3331 | |
3368 | | - |
| 3332 | + |
3369 | 3333 | |
3370 | 3334 | |
3371 | 3335 | |
| ||
3376 | 3340 | |
3377 | 3341 | |
3378 | 3342 | |
3379 | | - |
| 3343 | + |
3380 | 3344 | |
3381 | 3345 | |
3382 | 3346 | |
| ||
3511 | 3475 | |
3512 | 3476 | |
3513 | 3477 | |
3514 | | - |
| 3478 | + |
3515 | 3479 | |
3516 | 3480 | |
3517 | 3481 | |
| ||
3570 | 3534 | |
3571 | 3535 | |
3572 | 3536 | |
3573 | | - |
| 3537 | + |
3574 | 3538 | |
3575 | 3539 | |
3576 | 3540 | |
|
Collapse file
+13-19Lines changed: 13 additions & 19 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
296 | 296 | |
297 | 297 | |
298 | 298 | |
299 | | - |
300 | | - |
301 | | - |
302 | | - |
303 | | - |
304 | | - |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | + |
| 305 | + |
305 | 306 | |
306 | 307 | |
307 | 308 | |
308 | | - |
| 309 | + |
309 | 310 | |
310 | 311 | |
311 | 312 | |
312 | 313 | |
| 314 | + |
313 | 315 | |
314 | | - |
| 316 | + |
315 | 317 | |
316 | 318 | |
317 | 319 | |
| ||
333 | 335 | |
334 | 336 | |
335 | 337 | |
336 | | - |
| 338 | + |
| 339 | + |
337 | 340 | |
338 | | - |
| 341 | + |
339 | 342 | |
340 | 343 | |
341 | | - |
342 | | - |
343 | | - |
344 | | - |
345 | | - |
346 | | - |
347 | | - |
348 | | - |
349 | | - |
350 | 344 | |
351 | 345 | |
352 | 346 | |
|
Collapse file
+56-4Lines changed: 56 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
718 | 718 | |
719 | 719 | |
720 | 720 | |
721 | | - |
722 | | - |
| 721 | + |
723 | 722 | |
724 | | - |
| 723 | + |
725 | 724 | |
726 | | - |
| 725 | + |
727 | 726 | |
728 | 727 | |
729 | 728 | |
730 | 729 | |
731 | 730 | |
732 | 731 | |
733 | 732 | |
| 733 | + |
| 734 | + |
| 735 | + |
| 736 | + |
| 737 | + |
| 738 | + |
| 739 | + |
| 740 | + |
| 741 | + |
| 742 | + |
| 743 | + |
| 744 | + |
| 745 | + |
| 746 | + |
| 747 | + |
| 748 | + |
| 749 | + |
| 750 | + |
| 751 | + |
| 752 | + |
| 753 | + |
| 754 | + |
| 755 | + |
| 756 | + |
| 757 | + |
| 758 | + |
| 759 | + |
| 760 | + |
| 761 | + |
| 762 | + |
| 763 | + |
| 764 | + |
| 765 | + |
| 766 | + |
| 767 | + |
| 768 | + |
| 769 | + |
| 770 | + |
| 771 | + |
| 772 | + |
| 773 | + |
| 774 | + |
| 775 | + |
| 776 | + |
| 777 | + |
| 778 | + |
| 779 | + |
| 780 | + |
| 781 | + |
| 782 | + |
| 783 | + |
| 784 | + |
| 785 | + |
734 | 786 | |
735 | 787 | |
736 | 788 | |
|
Collapse file
+9-1Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
507 | 507 | |
508 | 508 | |
509 | 509 | |
| 510 | + |
| 511 | + |
510 | 512 | |
511 | 513 | |
512 | 514 | |
| ||
1038 | 1040 | |
1039 | 1041 | |
1040 | 1042 | |
1041 | | - |
| 1043 | + |
| 1044 | + |
| 1045 | + |
1042 | 1046 | |
1043 | 1047 | |
| 1048 | + |
| 1049 | + |
| 1050 | + |
| 1051 | + |
1044 | 1052 | |
1045 | 1053 | |
1046 | 1054 | |
|
0 commit comments