-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement til::au16
and til::u16a
conversion functions & make first use in WriteConsoleAImpl
#4493
Conversation
Initial thought: I'm not sure I love that it complicates |
I have not read the code yet, but my immediate reaction is "I'd rather have |
@miniksa @DHowett-MSFT If you still don't like it i will of course divide them into two. |
Nah, I'll reconsider when I get to reading this. I have to fix the tests for the project first. Sorry, I've been busy doing that instead of reading PRs. |
Haha, I was surprised anyway to get immediate reactions from you guys. I'm not in a hurry 🙂 |
@DHowett-MSFT I tried to make it easier for the compiler to remove the additional branching for |
Yeah, I don't know what got into me. Haha. I have you on my list, but I'm trying to track down the CI test failures now as top priority. So my full review will take a bit longer. Thanks for your patience. |
This is annoying now. I have any kind of const and non-const types in my test code, used |
We're likely to approve a few |
@miniksa Actually that was not the point. I still think my approach to update Nevermind. This is all rather off-topic now 🙂 |
It's fine. Thanks for your effort either way. Just keep in mind that our analysis system is our best effort of what we think we need to do for static analysis. You might prove it wrong in ways that we haven't thought about yet! |
I can only proof my local VS wrong which didn't report any warning in the analysis. But of course it's my fault. I should have seen that additional overloads for arrays are necessary to avoid the array decay. I don't want to tinker with that any longer. At least not in this PR. Maybe I start another one if the time is right ... |
The list of codepages without partials handling is a little shorter now, which also means that the support is better than what we have today. |
Oh and CP54936 might be of interest to meet the GB 18030 standard. |
I have to find out what's going wrong in #4673. Probably I'll commit the bug fix here. |
@miniksa I'll most likely file an issue that the console API functions need an overhaul. And I'll certainly jump on this. However, whenever I investigate the code I stumble over the same thing. It's the
But how does this go together with
Can you shed some light on that? |
Most of these are from master (you can look at master to see what's pending). It doesn't like |
I made #5124 to get master to a green check mark, any items that you see in the output in #4493 (comment) which aren't in jsoref@e80b602 are things that you'll need to add to a file. That appears to be just:
That's reasonable as both appear to be present in your PR. Going forward, the spell checker should automatically annotate your commits instead of just saying "I found stuff". I'd personally add both items to the main |
Great, thanks! |
(And that's merged, so now it really should just be those two.) |
Hmm, seems that I still should have added all annotated words? Sorry for my ignorance. |
You'd need to merge master again. You're missing e80b602. (Or you can have faith that when this is merged, it'd be merged in w/ master which would have that commit and you'd be fine.) |
The bot is judging your branch on its own merits, not considering that it might be merged into master. In the normal case, you would be branching off a green check (passing) master and thus any new items will be your own responsibility. Unfortunately your branch started off before the spell checker was merged, and between when the spell checker was written and when it was merged additional items were added. You then merged in master and got the spell checker which was still annoyed at Sorry for the bumpy ride. It's hard getting things merged into a fast moving project. But this should be the end of that adventure. Anyone who rebases on top of master now will be past it / as would anyone who merges to master now. |
Even if the misspellings are not marked to be resolved automatically by the bot (as I've seen in other PRs) that should be okay now since it obviously didn't find anything in the recent commits. |
Interesting... yeah, I could have the bot go back and look for previous comments and resolve them (or at least mark them as obsolete). I'll add that to my imaginary backlog. In testing, I've actually been manually doing that on some of my test PRs, so, yeah... that's definitely worth doing. (Right now, if it doesn't find any errors, it just won't leave a comment, and you'll get your green check mark. -- Here, you can see the check mark in german-one@ab4e0d7) |
Way too stale now 😀 |
Summary of the Pull Request
Implement conversion functions that complement the existing
til::u8u16
andtil::u16u8
for the use along with other codepages than UTF-8. A state class will take care of partials at the boundaries of DBCS-encoded text.References
Proposed in #4422 (comment)
PR Checklist
Detailed Description of the Pull Request / Additional comments
These functions have the potential to supersede
ConvertToW
andConvertToA
by adding partials handling.NOTE: The
astate
class supports only a subset of the possible codepages (see the remarks in the code).In order to see how it works I updated
WriteConsoleAImpl
accordingly.I plan to search the code base for more points to apply these functions to, and commit those updates in an upcoming PR.
Validation Steps Performed
WriteConsoleA