Skip to content

Note about smart quotes #11401

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

Closed
iRon7 opened this issue Sep 8, 2024 · 0 comments · Fixed by #11404
Closed

Note about smart quotes #11401

iRon7 opened this issue Sep 8, 2024 · 0 comments · Fixed by #11404
Assignees
Labels
area-about Area - About_ topics issue-doc-bug Issue - error in documentation

Comments

@iRon7
Copy link
Contributor

iRon7 commented Sep 8, 2024

Type of issue

Missing information

Feedback

(Sorry to bother you again with a minor issue 😊)

In the Quoting rules document, I think it would make sense to make note that smart quotes are interpreted as dump quotes and therefore also need to be escaped in a literal sting, e.g.: '`‘Hello,`’ he said, `‘to you`’'

It might also be a worth to mention to avoid enclosing strings with smart quotes #1936.

Related: https://stackoverflow.com/a/78961908/1701026

Page URL

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-7.4

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.4/Microsoft.PowerShell.Core/About/about_Quoting_Rules.md

Author

@sdwheeler

Document Id

0b3f8e35-a9eb-affd-4bef-c6d584373914

@iRon7 iRon7 added the needs-triage Waiting - Needs triage label Sep 8, 2024
@michaeltlombardi michaeltlombardi added area-about Area - About_ topics issue-doc-bug Issue - error in documentation labels Sep 9, 2024
@michaeltlombardi michaeltlombardi self-assigned this Sep 9, 2024
@michaeltlombardi michaeltlombardi removed the needs-triage Waiting - Needs triage label Sep 9, 2024
michaeltlombardi added a commit to michaeltlombardi/PowerShell-Docs that referenced this issue Sep 9, 2024
Prior to this change, the `about_Quoting_Rules` topic document
didn't indicate that PowerShell treats smart/typographic
quotation marks as normal/programmer quotation marks, making
them subject to the same escaping and quoting behaviors.

This change:

- Adds a note about smart quotation marks and guidance to avoid
  using them to enclose strings.
- Adds an example of escaping smart quotation marks.
- Fixes AB#309820
- Resolves MicrosoftDocs#11401
@Taojunshen Taojunshen mentioned this issue Sep 9, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-about Area - About_ topics issue-doc-bug Issue - error in documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants