Typographical (Smart) Quotes Algorithm

Hi all, I have some questions about straight vs. typographical quotes:
1.
As far as I concern there can be 2 different techniques to change straight to typographical quotes:
a) a RegExpr that searches for pairs of quotes,
b) changing a quote by analysing its surrounding characters.
Which of the 2 is preferable?
Can someone tell me, where I can find good algorithms that do this task?
2.
Does somebody know which algorithm was implemented in InDesign to transform straight to typographical quotes?
Thanks
Tobias

No, you're doing it right. Try the exact same procedure in TextEdit, which also relies on OS X's text substitutions mechanism for this, and you'll find it works exactly as you expect. This is a lingering bug in Pages 5.

Similar Messages

  • Can I get typographic ("smart") quotes in iOS Keynote?

    The subject line shows I can get typographic quotes on my iPad if I dig three layers deep, but on OS X, Keynote will, as an option, substitute them directly when you type the plain-ASCII character.
    So I can get what I need by dropping everything and doing some precision drags, but it's error-prone and distracting. Especially since the quote characters on the popup aren't easy to tell apart.
    I haven't found a setting, and my Net searches are not encouraging, but is there a way to do it?

    No, and probably. The last update saw the introduction of smart strings. As far as I know we have to wait for Apple to add more instruments, or create a plug-in system.
    tt2

  • Convert smart quotes and other high ascii characters to HTML

    I'd like to set up Dreamweaver CS4 Mac to automatically convert smart quotes and other high ASCII characters (m-dashes, accent marks, etc.) pasted from MS Word into HTML code. Dreamweaver 8 used to do this by default, but I can't find a way to set up a similar auto-conversion in CS 4.  Is this possible?  If not, it really should be a preference option. I code a lot of HTML emails and it is very time consuming to convert every curly quote and dash.
    Thanks,
    Robert
    Digital Arts

    I too am having a related problem with Dreamweaver CS5 (running under Windows XP), having just upgraded from CS4 (which works fine for me) this week.
    In my case, I like to convert to typographic quotes etc. in my text editor, where I can use macros I've written to speed the conversion process. So my preferred method is to key in typographic letters & symbols by hand (using ALT + ASCII key codes typed in on the numeric keypad) in my text editor, and then I copy and paste my *plain* ASCII text (no formatting other than line feeds & carriage returns) into DW's DESIGN view. DW displays my high-ASCII characters just fine in DESIGN view, and writes the proper HTML code for the character into the source code (which is where I mostly work in DW).
    I've been doing it this way for years (first with GoLive, and then with DW CS4) and never encountered any problems until this week, when I upgraded to DW CS5.
    But the problem I'm having may be somewhat different than what others have complained of here.
    In my case, some high-ASCII (above 128) characters convert to HTML just fine, while others do not.
    E.g., en and em dashes in my cut-and-paste text show as such in DESIGN mode, and the right entries
        –
        —
    turn up in the source code. Same is true for the ampersand
        &
    and the copyright symbol
        ©
    and for such foreign letters as the e with acute accent (ALT+0233)
        é
    What does NOT display or code correctly are the typographic quotes. E.g., when I paste in (or special paste; it doesn't seem to make any difference which I use for this) text with typographic double quotes (ALT+0147 for open quote mark and ALT+0148 for close quote mark), which should appear in source code as
        “[...]”
    DW strips out the ASCII encoding, displaying the inch marks in DESIGN mode, and putting this
        "[...]"
    in my source code.
    The typographic apostrophe (ALT+0146) is treated differently still. The text I copy & paste into DW should appear as
        [...]’[...]
    in the source code, but instead I get the foot mark (both in DESIGN and CODE views):
    I've tried adjusting the various DW settings for "encoding"
        MODIFY > PAGE PROPERTIES > TITLE/ENCODING > Encoding:
    and for fonts
        EDIT > PREFERENCES > FONTS
    but switching from "Unicode (UTF-8)" to "Western European" hasn't solved the problem (probably because in my case many of the higher ASCII characters convert just fine). So I don't think it's the encoding scheme I use that's the problem.
    Whatever the problem is, it's caused me enough headaches and time lost troubleshooting that I'm planning to revert to CS4 as soon as I post this.
    Deborah

  • Smart quotes in languages other than English

    Hi to all,
    As a technical writer, I deal with texts in several languages. One of the problems I have with FrameMaker, is that French and German "smart" (or "typographic") quotes are not entered automatically. Quotation marks remain in the English format. The solutions offered in Adobe's Knowledge Base are less than optimal:
    - Replacing the way FrameMaker writes smart quotes in the Maker.ini file is made on a general base, and not per language.
    - Manually entering all quotation marks cannot be done easily when you receive a text from others.
    Is there a viable solution to this problem?
    Paolo

    Paolo,
    One way would be to create a small custom config file for each specific language that modifies the definition of the standard double-quote characters used for the Smart quotes. The definition for the standard characters in cmds.cfg  (in the \fminit\configui folder) is:
    <Command CharLeftDblQuote
        <Label Left Double Quote>
        <Definition \xd2>>
    <Command CharRightDblQuote
        <Label Right Double Quote>
        <Definition \xd3>>
    where the Definition parameter specifes the hex value (i.e. character in the FrameRoman encoding) to use for the character that you wish to display in FM.
    For the French, version create a file with those two entries (call it French_smartquotes.cfg) and change the hex values to the appropriate language-specific quote, i.e. guillemotleft is \xc7 and guillemotright is \xc8. Likewise for the German.
    Then, when you need to work in any of theose languages, use View > Menus > Modify... and select the appropriate .cfg file. This will then temporarily change the mapping for the double-quote characters such that when you enter them from the keyboard, the appropraite language specific quote will be used. To switch languages, simply select another .cfg file using the View > Menus > Modify... The setting only persists for the current FM session.
    The alternative is to edit the maker.ini file to enable the language specific smart quotes, listed in the [Spelling] section. The entry is:
    ; Smart Quote Characters
    ; SmartQuotes \xd4\xd5\xd2\xd3 )  English curved quotes
    ; SmartQuotes \xe2\xd4\xe3\xd2 )  German-style quotes with base quotes
    ; SmartQuotes \xd5\xd5\xc7\xc8 )  French-style quotes using guillemets
    ; SmartQuotes \xd5\xd5\xd3\xd3 )  Swedish- and Finnish-style quotes
    ; SmartQuotes \xd4\xd5\xd2\xd3 )  Italian curved quotes
    ; English curved quotes:
    SmartQuotes=‘’“”
    Delete the ";" at the front to un-comment the appropriate entry and add a ";" to the english one.
    However, this route requires you to close FM every time yo uwish to make a change.

  • Auto-smart quotes in Mountain Lion.

    Being kind of a weirdo, one huge draw to OS X for a long while now has been its ability to automatically turn dumb quotes into smart quotes. 
    That is,
    " " into “ ” .
    Just a bit of a typographical quirk I have.
    Anyway, since getting Mountain Lion, this function simply doesn't work as it should.  When it is simply enabled in the [edit > substitutions] menu, nothing happens.  So, I found out, that when you go into the [edit > show substitutions] menu, you can get it to work if you have 'text replacement' checked.  However, with one monstrous caveat: after the quotes get changed to smart ones, weird stuff starts to happen. In contractions, the cursor will move to the letter directly adjacent to the new smart quote.  E.g. in the word I've, the cursor will move between the v and e after you hit the spacebar; in the word don't, it'll move next to the t.
    In essence, it makes the function totally useless because it turns typing into a total hassle.  I swear it didn't do this in one of the earlier versions of 10.8, but it sure does now.  Perhaps someone knows of a way to fix this?  Or is it simply a bug that slipped through the cracks because it's a pretty esoteric feature?
    I guess the only other option is to stop being so ridiculous, but now why would I want to do that?

    I, too, am having the same problem – except I am using Lion (10.7.5).  If I remember correctly, this was a problem even in 10.7.4.  Totally aggravating for us weirdos.  I just can’t tell if the problem has to do with Safari (or other applications) or whether it is an operating-system-wide setting/problem.  I have tried a few different trouble-shoots – combinations of the “System Preferences” panel and “Substitutions” from within Safari – but all to no avail.

  • Smart quotes driving me slightly nuts

    I get copy sent in word documents.  I've just moved my workflow from illustrator to indesign to speed things up.
    The font I use apparently does not contain the glyph for the smart quotes.  When I paste into indesign I get little square boxes where the apostrophes and quotation marks should be.
    Now illustrator bless its cotton socks, replaces the fonts missing glyph with Myriad.  Indesign does not. I cant turn off the smart quotes in word because they are replaced as they are entered. It makes no sense to me that illustrator is better at this than indesign.
    I am now committed to indesign and to this font.  But I'm not going to save any time if I have to manually replace apostrophes and quotation marks.
    Any ideas?

    Any ideas?
    1) Preprocessing in Word - use a Word document template with the autocorrect straight-quotes-to-typographer's-quotes turned off, and then Find all quotes and Replace with quotes in your font. Incidentally, that's why quotes are replaced as they are entered in Word - it's one of the autocorrect/autoformat as you type/auto-interfere-with-your-working-method settings. (Blech.)
    2) Find/Change in InDesign - first Find any double quotes (") and replace with straight quotes (^") then do the same for single quotes (' to ^') if necessary. This can be automated, or at least you can reduce the number of clicks, in a few ways - by scripting or by saving the query at the top of the Find/Change window.
    3) Scott suggests GREP styles - that'd be the fastest way to do it, assuming you're using a version of InDesign new enough to include GREP styles, and that you know how to grep.

  • Pasting smart quotes and apostrophes in code view.

    Sine upgrading to Dreamweaver CS5, I haven't been able to copy/paste smart quotes and apostrophes into code view without them automatically being converted to straight quotes.
    For example, the following sentence (notice the curly quotes):
    John’s new song is called “DW Blues”
    would get pasted into Code View as:
    John's new song is called "DW Blues"
    Notice the smart quotes and apostrophe are replaced with single and double ticks, or "straight quotes."  While this seems like a minor detail, it's extremely important to our writers and editors to have them appear on the website exactly as typed.
    If I do the same copy/paste in Design View (doc type is XHTML Transitional), it appears as:
    John's new song is called &quot;DW Blues&quot;
    The characters are still replaced, and the straight quotes are then entity encoded (as expected).
    This doesn't happen with other valid UTF-8 characters like ™, ®, —, etc., or with any other code editors I've used, including DW CS3.
    Is there a hidden preference somewhere to disable this "feature," or is it just a bug?
    Please help!

    It's now 4 years since jsparacio posted this, and I just wanted to let everyone know that I had -- and am still having -- the exact same problem with Dreamweaver CS5 (running first under Windows XP, then Windows 7, and now again with Windows 8.1). So it's not just Macs that are affected.
    FWIW, I have set my DW CS5 Paste preferences to the 3rd of 4 options available
        1 - Text Only
        2 - Text With Structure
        3 - Text With Structure Plus Basic Formatting
        4 - Text With Structure Plus Full Formatting
    in the EDIT > PREFERENCES > Copy/Paste Preferences dialog box.
    But the Paste Special command ignores this setting, giving me only the first 2 options from which to choose, with option 2 the default selection for Paste Special operations (options 3 and 4 are grayed out, and can't be selected).
    According to David Sawyer McFarland's _Dreamweaver CS5: The Missing Manual_ (O'Reilly Media, 2010), the reason these are grayed out is because I am pasting unformatted ASCII text which I generated in a program editor called "UltraEdit":
        "... Choose EDIT > PASTE SPECIAL to open the Paste Special window. Here, you can choose which of the four techniques you wish to use ... sort of. You're limited to what Dreamweaver can paste. For non-Microsoft Office products, you can use only the first two options--the others are grayed out--whereas you can choose from any of the four with text copied from Word or Excel." (McFarland, p. 81)
    Regardless of such restrictions, standard copy-and-paste (CTRL+C followed by CTRL+V) works just fine for me using Dreamweaver CS4 (i.e., I have never needed to use the Paste Special command), but with DW CS5, neither Paste command (CONTROL+V or CTRL+SHIFT+V) works properly with typographic/curly/smart quotes.
    All typographic quotes -- ASCII-0146 and ASCII-0147 (double quote marks); plus ASCII-0145 and ASCII-0146 (single quote marks, for quotes within a quote) -- are converted to inch (&quot; is entered in the code) and foot (' is entered in the code) marks when I copy-and-paste text with these characters into Dreamweaver's Design View.
    When I copy this same plain ASCII text directly into the code (rather than using Design View), typographic double open & close quotes are converted to the inch (") mark, and typographic single open & close quotes are converted to the foot (') mark.
    The beginning of this week, I installed Dreamweaver CS5, ver. 11.0, Build 4909 under Windows 8.1 OS on my new Ultrabook. I was hoping that under Windows 8.1, DW CS5's handling of typographic quotes might improve so that I can actually use this program that I purchased 4 years ago. Alas, no such luck: I continue to have the same problem I had when I first upgraded to Dreamweaver CS5 back in August 2010 (then running under Windows XP on my desktop computer).
    Back in August 2020, when I first asked about fixes, I was told to change the Title/Encoding setting of Page Properties to "Western European" -- which I tried, but it didn't work then, and it doesn't work now ... and even if it did, it wouldn't be a proper fix for the problem as I have plenty of good reasons for wanting my HTML page Title/Encoding set to Unicode (UTF-8), not Western European ("charset=iso-8859-1").
    The ability to copy-and-paste typographic quotes is such a big deal for me that I chose back in August 2010 to revert to Dreamweaver CS4, which I've been using ever since.
    It is *very* frustrating that, 4 years later, I still can't use this program, and shall be reverting to DW CS4, yet again.
    I continue to be completely flummoxed by this. Every other program with which I am familiar converts non-typographic quotes to typographic/curly/smart quotes ... never have I seen the process automated in reverse!

  • Smart Quotes will not turn off

    I have Smart Quotes turned off in Smart Punctuation, but they are still curly! I need them straight, how do I get then straight? AI CS5.5, OSX 10.8.2.

    I only have CS3 in front of me right now.
    Straight quotes and curly quotes are different characters residing in different slots of the font. Toggling on/off the Use Typographer's Quotes setting in Document Setup does not retro-actively update text already set on the page. Try changing the setting and then re-typing the existing characters.
    Type>Smart Punctuation is basically a pre-packaged find/replace command. It replaces straight quotes with curly quotes when you tell it to (for either the whole document or just the current selection), but it does not do the opposite. So if you are trying to replace existing curly quotes with straight quotes, you'' need to do your own Find/Replace.
    Whichever kind you have the document set to consider default (controlled by the Tyographer's quote setting in Document Setup) is the one that will be keyed into the Find/Replace dialog if you key it in. So you'll need to copy the other kind so that you can paste it into the Find/Replace dialog.
    JET

  • Find open and close smart quotes

    Dear scripter,
    Here I am trying find whether all the open double smart quotes(") are closed with close double smart quotes("). Here is my small work to find how many open and close quotes.
    myopenqu=app.activeDocument.search("^{", false, false, "^{");
    myclosequ=app.activeDocument.search("^}", false, false, "^}");
    myopenqulength = myopenqu.length;
    myclosequlength = myclosequ.length;
    if(myopenqulength!=myclosequlength)
    alert("Quotes not matched\n"+ myopenqulength +" Open quotes found\n" + myclosequlength +" Close quotes found")
    It works well, the script just alert if I have 25 open quotes and 23 close quotes
    Quotes not matched
    25 Open quotes found
    23 close quotes found
    Now I want to find the quote set where the 24,25th set close quotes are missing?
    Is there any way to find the misisng quotes
    Thanks in advance
    regards
    a r u l
    vpublish.net

    You'd have to look for unmatched quotes, in this case two cases of two open quotes without an intervening closed quote. This is difficult to script in CS2 because it doesn't have GREP natively and because of footnote problems. In CS3/4 it should be possible. But even then it will work only if you don't have quotes within quotes.
    Peter

  • Smart Quotes

    Hi,
    How do you create smart quotes in Photoshop? (Opening and close quotes)
    Thanks!

    It's in the application preferences under type. Just check the Smart Quotes box, and all your quotes will come out right. 

  • Smart quotes and em-dashes in epub file

    When I create an epub file from my InDesign book file, I find that sometimes (not always, thought!) my smart quotes and em-dashes revert to gibberish.
    For example, when I open the epub file, the em-dash is fine, but in chapter 2, it changes to —.
    Does anyone know how I might correct this?
    Thanks so much!

    It sounds like somethings wrong with the chapter's character encoding.  The character encoding is declared in the header of the ePub HTML. From ID it's:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    This test has UTF-8 declared in the first line of its source code:
    http://www.zenodesign.com/forum/encodetest/UTF8.html
    And this has no encoding
    http://www.zenodesign.com/forum/encodetest/None.html
    Most browsers let you override or choose the character set, so in Safari if you set the character set to View>Text Encoding>default, you'll see a difference between the above links, but if you set it to Unicode (UTF-8) they both display correctly. In FireFox it's View>Character Encoding.
    You can check and edit the contents of the .epub file by changing the extension from .epub to .zip, and then extracting the contents.

  • Find and replace smart quotes with straight quotes?

    I understand I can turn off smart quotes so that I can type straight quotes, but I need to replace hundreds of curly smart quotes with straight quotes, is there a feature that will let me do this? I am using FM8.
    Thanx,
    Willian

    I am using FM9....so I don't know if the same shortcuts apply, but this is what I found out last week.
    Use the Find and Replace tool:
    With smart quotes turned off and the Num Lock key turned on:
    Alt0147 will give you beginning quotation marks
    Alt0148 will give you ending quotation marks
    In the Find box use ALT0147 or ALT0148 for the beginning or ending quotes. When you click in the box and type
    one of the shortcuts the correct quote will be shown in the box.
    In the replace box type the regular straight quotes on your keyboard.
    I was thrilled that it would work!...course you do have to do them separately and be careful not to replace the curly quotes
    that you want to leave in your document.
    Hope this helps using FM8....
    ls

  • Preview and "Smart" quotes

    I am trying to search through a PDF document that contains some (unfortunately named) "smart quotes". The term I am searching for is "Dean's", however the document contains "Dean’s". The quote mark in the second word is actually a multibyte Unicode character.
    Is there a way to configure Preview, or the Mac in general, to ignore these differences when performing searches? That is, to find "Dean’s" even when I'm looking for "Dean's"? As a human, there's essentially no difference between the two.

    Is there a way to configure Preview, or the Mac in general, to ignore these differences when performing searches?
    I think not, they represent two different character streams. You probably need to search for both if you don't already know which of them the text uses.
    But some apps may do this automatically. I think Pages, for example, may find both kinds of punctuation when you put either in the Edit > Find dialogue.

  • Problem with javascript/PHP/ oracle 10g smart quotes

    I have a problem with my php form that passes the text field to a javascript object. When I copy text from MS Word that includes smart quotes, the form inputs that into the database as ? (upside down) marks. The charset of the DB is WE8MSWIN1252. How do I store these smart quotes as regular quotes? And also if I can do any conversions on the front end (js or php). I tried doing some conversion but to no avail. Any help would be appreciated thank you. “double”

    Decide if you want your HTML pages in Windows code page 1252 or Unicode UTF-8. Then, make sure the pages are properly tagged as either "text/html;charset=windows-1252" or "text/html;charset=utf-8". Use HTTP header Content-type or the corresponding <META HTTP-EQUIV=...> tag. Then, set NLS_LANG environment variable for your PHP engine to either AMERICAN_AMERICA.WE8MSWIN1252 or to AMERICAN_AMERICA.AL32UTF8, depending on which encoding you selected for your HTML.
    -- Sergiusz

  • German smart quotes on English UI

    Hi,
    I need to write German letters on my MacBook Air, whose language settings are set to English (US). The problem is that even when spell check is set to German, the smart quotes still appear as the should in the English language. I originally was a Windows user and when I use MS Word to type, it automatically detects document language and formats text accordingly. The following is what shows up when I use Word on Windows:
    „Guten Morgen“, sagte der Bäcker.
    “Good morning”, said the baker.
    When I use any writing software on Mac, though, it shows up like this (and even in retrospect, there doesn't seem to be a way to change it):
    “Guten Morgen”, sagte der Bäcker.
    “Good morning”, said the baker.
    I understand that in OS X, software-specific language settings depend on the system language. Coming from Windows, I'm surprised that there is no way to set document language in OS X. Or is there?
    What do I need to do to type a German letter, complete with all German symbols, but without having to switch system language every time? I'm sure I'm not the only one with this problem, but I could not find any good ideas on how to solve my problem. I hope you can help me.
    Best wishes.
    Nils

    How about an OS X service that works in any application, and will place Gänsefüßchen around any selected text string. What if you selected the text, and then pressed control+Q, and the quotes were inserted around the selected text? You may also find this a useful tool.
    Open Automator, New Document, and Service.
    In the left Automator panel select Library > Utilities > Run AppleScript.
    Drag and drop the Run AppleScript action into the larger workflow window to the right.
    Select and remove the contents of that Run AppleScript window.
    Copy/Paste the AppleScript code from below into the Run AppleScript window
    Click the hammer in the Run AppleScript toolbar
    Service receives text from any application
    Output replaces selected text
    Automator > File > Save...
    Give your script a meaningful name. I called mine Gänsefüßchen.
    It is written into your <login>/Library/Services folder
    In System Preferences > Keyboard > Shortcuts > Services
    Scroll down in the right window until your assigned service name appears
    On the right side where it says none, click once, and it will change to an add shortcut button.
    Type control and Q which will appear as ^Q. Press return. Exit System Preferences.
    Exit any running application where you might use this. Then restart the application.
    With your text selected, press control+Q to get the Gänsefüßchen.This service item appears under Application Name > Services too.
    Automator Service Gänsefüßchen
    AppleScript code
    on run {input, parameters}
      -- we want to insert german quotes around the selected text
      tell application "System Events"
      set links_zitat to "„"
      set recht_zitat to "”"
      set german_quotes to ""
      set german_quotes to links_zitat & input & recht_zitat
      set input to german_quotes
      end tell
      return input
    end run

Maybe you are looking for

  • Bypass D-Chain specific status of material master

    Hi, Is there a way ( Copy Routine/ user exit)  to bypass D-Chain specific status of material master which prevents creation of Delivery doc w.r.t a PO in STO scenario? I dont want change the config setting for status to allow delivery creation. Thank

  • Image Processor prompts to hit "OK" within an action.

    I am making incremental scale adjustments to an image and saving each change as a separate jpg.  The result is a series of jpgs that will be animated as an image sequence in After Effects.  The scale adjustment and the saving process (using "image pr

  • My apple ID was changed by a stranger. Help me!

    My apple ID was changed by a stranger.I want to reset the system through email but do not send me the link to reset.  I was in Vietnam. Thank you <Email Edited by Host>

  • HT1660 How can I get my library from my i pod back to the computer after a crash?

    I lost my library after a computer crash.  I'd like to transfer everything back from my I Pod if possible.  I reinstalled I tunes and the screen looks totally different  There is no 'file' to work from and the disc does not get picked up from the dri

  • File size in backup

    When backing up to TC are the files just being copied in there original format or are they being made smaller? In other words is a 100 mb Quicktime movie file the same thing when its backed up on tc