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

[JIT] Imbue stringbuf with C locale (#79929) #79983

Merged
merged 1 commit into from Jun 22, 2022

Conversation

atalman
Copy link
Contributor

@atalman atalman commented Jun 21, 2022

To prevent 12345 become "12,345" if locale is not "C", as shown in the
following example:

int main() {
  std::locale::global(std::locale("en_US.utf-8"));
  std::stringstream ss;
  ss << "12345 in " << std::locale().name()  << " locale is " << 12345 ;
  ss.imbue(std::locale("C"));
  ss << " but in C locale is " << 12345;
  std::cout << ss.str() << std::endl;
}

Fixes #79583

Pull Request resolved: #79929
Approved by: https://github.com/davidberard98

To prevent 12345 become "12,345" if locale is not "C", as shown in the
following example:
```cpp

int main() {
  std::locale::global(std::locale("en_US.utf-8"));
  std::stringstream ss;
  ss << "12345 in " << std::locale().name()  << " locale is " << 12345 ;
  ss.imbue(std::locale("C"));
  ss << " but in C locale is " << 12345;
  std::cout << ss.str() << std::endl;
}

```

Fixes pytorch#79583

Pull Request resolved: pytorch#79929
Approved by: https://github.com/davidberard98
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 21, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 84bd906 (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jun 21, 2022
@atalman atalman merged commit bcfb424 into pytorch:release/1.12 Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed oncall: jit Add this issue/PR to JIT oncall triage queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants