Closed Bug 1315152 Opened 5 years ago Closed 5 years ago

I can't build on VisualStudio 2015 on Japanese locale after landing bug 1260626.

Categories

(Core :: Security: PSM, defect)

x86
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mantaroh, Unassigned)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1260626 +++

I faced the build failure due to file encoding.
The change of bug 1260626 contained the multi-byte code.[1] 
In Japanese environment, The VisualStudio will identify as CP932.

[1] https://hg.mozilla.org/mozilla-central/rev/851d4bd145a4#l1.74
Flags: needinfo?(cykesiopka.bmo)
Summary: I can't build on VisualStudio 2015 on Japanese locale. → I can't build on VisualStudio 2015 on Japanese locale after landing bug 1260626.
The patch in bug1260626 results in build failure under Traditional Chinese environment, too

We can workaround it by deleting the multibyte char here.
https://dxr.mozilla.org/mozilla-central/rev/3b80868f7a8fe0361918a814fbbbfb9308ae0c0a/security/manager/ssl/tests/unit/pkcs11testmodule/pkcs11testmodule.cpp#104

It seems that this patch affects language environment with multibyte char.
Bug 1313280 will fix this.
Depends on: 1313280
Or we can fix this by using UTF-8 string literals:
> static const char TestSlot2Description[] = u8"Test PKCS11 Slot 二";
(In reply to Masatoshi Kimura [:emk] from comment #3)
> Or we can fix this by using UTF-8 string literals:
> > static const char TestSlot2Description[] = u8"Test PKCS11 Slot 二";

Ah, this will not work because it will not change the execution character set.
s/execution character set/source character set/

Sorry for the bugspam.
Sorry about that.

Anyways, here's my plan:
1. I will attach a patch containing a workaround that should unbreak non-Western environments and keep PSM tests passing as well.
2. I will wait to see if Bug 1313280 gets fixed in a reasonable time, since that is the proper fix, and we do want to keep the multibyte char to test PKCS #11 UTF-8 handling.
3. If Bug 1313280 doesn't progress quickly enough, I'll get the workaround patch reviewed and landed.
No longer blocks: 1311601
Flags: needinfo?(cykesiopka.bmo)
Fixed by bug 1315152.

For the record, a better workaround would be use utf-8 literals *and* universal character name (UCN):
   static const char TestSlot2Description[] = u8"Test PKCS11 Slot \u4E8C";
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.