-
Notifications
You must be signed in to change notification settings - Fork 313
Adding handing for DBCS characters #140
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
Conversation
Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com>
Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com>
Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for Double-Byte Character Set (DBCS) characters, particularly Japanese Kanji, in parameter names and constraints. The implementation includes locale handling improvements and a refactored number parsing mechanism to properly handle multibyte characters.
Changes:
- Added locale configuration with UTF-8 support and fallback handling in the main entry point and file I/O operations
- Refactored number parsing from
wistringstreamtostd::stodfor better DBCS compatibility - Fixed a bug where results weren't cleared before generation, preventing duplicate entries
- Added test coverage for Japanese Kanji characters in parameters and constraints
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/bug/bug024.txt | New test file with Japanese Kanji characters in parameter names and constraint expressions |
| test/bug/.tests | Added test case for bug024.txt |
| cli/pict.cpp | Added locale initialization with UTF-8 support and fallback to classic locale |
| cli/mparser.cpp | Applied locale imbuing to file input streams for proper character decoding |
| cli/ctokenizer.cpp | Refactored number parsing to use std::stod instead of wistringstream for DBCS compatibility |
| api/model.cpp | Added results clearing before generation to prevent duplicates |
| .gitignore | Added .vscode/settings.json to ignored files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Fix PictGenerate to clear previous results before generating new ones (microsoft#134) * Initial plan for issue * Fix PictGenerate to clear previous results before generating new ones Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Fix PictGenerate to clear previous results and update .gitignore Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Remove libpict.so binary and revert .gitignore changes Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Adding handing for DBCS characters (microsoft#140) * Initial plan for issue * Fix PictGenerate to clear previous results before generating new ones Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Fix PictGenerate to clear previous results and update .gitignore Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Remove libpict.so binary and revert .gitignore changes Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Fix Unicode handling and add test for Japanese Kanji characters --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Add comprehensive development guidelines for the PICT repository * chore: resolve conflict * chore: resolve conflict * Revert "chore: resolve conflict" This reverts commit 3087955. * Revert "chore: resolve conflict" This reverts commit 3870bb6. * chore: remove copilot instructions document --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> Co-authored-by: Jacek Czerwonka <jacekcz@microsoft.com>
* Fix PictGenerate to clear previous results before generating new ones (microsoft#134) * Initial plan for issue * Fix PictGenerate to clear previous results before generating new ones Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Fix PictGenerate to clear previous results and update .gitignore Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Remove libpict.so binary and revert .gitignore changes Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Adding handing for DBCS characters (microsoft#140) * Initial plan for issue * Fix PictGenerate to clear previous results before generating new ones Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Fix PictGenerate to clear previous results and update .gitignore Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Remove libpict.so binary and revert .gitignore changes Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> * Fix Unicode handling and add test for Japanese Kanji characters --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Add comprehensive development guidelines for the PICT repository --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: jaccz <9115223+jaccz@users.noreply.github.com> Co-authored-by: Jacek Czerwonka <jacekcz@microsoft.com>
No description provided.