Split from D103426
The other patches rely on this, so the faster this is accepted the better
Differential D106753
ConvertUTF: Created wrapper convertUTF32ToUTF8String MarcusJohnson91 on Jul 24 2021, 11:48 AM. Authored by
Details
Split from D103426 The other patches rely on this, so the faster this is accepted the better
Diff Detail Event TimelineComment Actions I don't understand why the build failed? I've compiled it and ran all the tests with time ninja check Comment Actions Please fix clang-format issues. (You can use the clang-format-diff.py script.)
Comment Actions The buildbot seems to think your new unittests are broken. Not sure why. (You can run just the unittests with "ninja check-llvm-unit".)
Comment Actions The problem seems to be in the conversion function expecting strings to be a multiple of 4 bytes, which doesn't hold up with the way ArrayRef stores things as char that is casted to char32_t, when using ASCII values like in the look of disapproval emoji, having an underscore in the middle. But removing the assert and early return result in even more errors. changing the input string to remove the underscore also fails, i'm out of ideas. Comment Actions The tests work on my machine now, turns out the Big endian one needs a BOM, pretty obvious in hindsight.
Comment Actions It seems like this diff keeps getting reverted? I've fixed all the issues mentioned, and the tests work now, everything is formatted correctly too. I've set git up to do full context diffs, but it's not working? @efriedma it seems like you are commenting on old revisions? the first comment about the UTF16 BOM in the UTF32 converter was fixed a long time ago and the second comment, line 168 I don't even see what you're talking about there Comment Actions As far as I can tell, the lastest version of the diff you uploaded still has the following issues that haven't been addressed:
Comment Actions There is only one function in ConvertUTFWrapper.cpp: convertUTF32ToUTF8String idk wtf is going on, maybe the ammending the commit is breaking something? the diff I see here is correct... Maybe I should just make a new diff here entirely? Comment Actions If you're having trouble making Arcanist work correctly, you can always just upload "git diff" or "git show" output at https://reviews.llvm.org/differential/diff/create/ . |
UNI_UTF32_BYTE_ORDER_MARK_SWAPPED doesn't have the correct bit pattern.