Skip to content
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

[CBRD-22793] C++ regex gives a different result and error message on Windows #2186

Merged
merged 4 commits into from
Jan 31, 2020

Conversation

hgryoo
Copy link
Member

@hgryoo hgryoo commented Jan 30, 2020

http://jira.cubrid.org/browse/CBRD-22793

  1. collating element syntax doesn't work well. e.g.) [[.tilde.]], [[.ch.]] and it returns always true on Windows(MSVC). To handle this issue, an error_collate exception is thrown for both linux and windows when there exists the syntax.
    • cub_reg_traits::lookup_collatename() is going to be invoked on g++
    • cub_reg_traits::lookup_collatename() is not invoked on MSVC even there exists the syntax in pattern. As a hacky way, the collation element syntax pattern is going to be searched in pattern string. Then if the syntax is found, it throws an exception.
  2. regex_error::what() gives a different level of error message depending on the compiler.
  3. added new header and source for regex related functions. (string_opfunc.c file becomes too long)

@hgryoo hgryoo added this to the damson milestone Jan 30, 2020
@hgryoo hgryoo self-assigned this Jan 30, 2020
@hgryoo hgryoo merged commit 3371cd3 into CUBRID:develop Jan 31, 2020
hgryoo added a commit to hgryoo/cubrid that referenced this pull request Sep 24, 2020
…Windows (CUBRID#2186)

http://jira.cubrid.org/browse/CBRD-22793

throws an error for the collation element syntax which doesn't work well in <regex> and make the same level of the error message by parsing the error code for linux and windows. added new header and source for regex related functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants