French Space-Before-Punctuation Rule

Normalize internal plain-prose spacing before French semicolon/question/exclamation/colon using explicit caller regional typographic choices, preserving start-of-line marks; not safe for URLs/code or a universal language-wide spacing rule.

Description

French punctuation spacing follows a declared style and region.

French punctuation spacing follows a declared style and region. Nonbreaking and narrow nonbreaking spaces have different layout behavior.1

Enter plain prose and explicit ordinary, nonbreaking or narrow nonbreaking spaces separately for ;!? and colon. Normalize internal mark spacing, preserve start-of-line marks and return changed punctuation source UTF-16 indices.

When to use French Space-Before-Punctuation Rule

Use French Space-Before-Punctuation Rule when you need to evaluate the supplied records under the calculation and evidence rules below. No URL/code awareness or universal regional rule is supplied; use on prose only.

Prepare explicit text tokens, annotated language observations, caller mappings or a supported locale as requested. Preserve source evidence and the stated Unicode counting convention.

How to use French Space-Before-Punctuation Rule and understand its results

  1. Prepare explicit text tokens, annotated language observations, caller mappings or a supported locale as requested. Preserve source evidence and the stated Unicode counting convention.
  2. Enter plainProseText, callerSemicolonQuestionExclamationSpace, callerColonSpace using the field table and calculation rules, then run the tool.
  3. Read textWithCallerFrenchPunctuationSpacing, changedPunctuationSourceUtf16Indices. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
plainProseTextPlain prose textstringRequired
callerSemicolonQuestionExclamationSpaceCaller semicolon question exclamation spacestringRequired
callerColonSpaceCaller colon spacestringRequired

Enter plain prose and explicit ordinary, nonbreaking or narrow nonbreaking spaces separately for ;!? and colon. Normalize internal mark spacing, preserve start-of-line marks and return changed punctuation source UTF-16 indices.

replace preceding U+0020/U+00A0/U+202F run with selected single space

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
textWithCallerFrenchPunctuationSpacingText with caller french punctuation spacingstring
changedPunctuationSourceUtf16IndicesChanged punctuation source utf16 indiceslist of number
json
{
  "input": {
    "plainProseText": "Salut ! oui:non",
    "callerSemicolonQuestionExclamationSpace": " ",
    "callerColonSpace": " "
  },
  "output": {
    "textWithCallerFrenchPunctuationSpacing": "Salut ! oui :non",
    "changedPunctuationSourceUtf16Indices": [
      6,
      11
    ]
  }
}

Limitations and assumptions

No URL/code awareness or universal regional rule is supplied; use on prose only.

Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Spanish Inverted Punctuation Placement Rule: Spanish inverted punctuation can be checked for structural pairing. Balanced marks do not identify the grammatical scope of a question or exclamation. For a complementary task, use Greek Question Mark Semicolon Quirk: Greek question-mark code point U+037E is canonically equivalent to a semicolon. Interpreting semicolons as questions requires the caller’s Greek context.

References

  1. French Space-Before-Punctuation Rule — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies