Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8400675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:37:09+00:00 2026-06-09T21:37:09+00:00

I have a file containing some diaeresis marks, ̈ . I need to replace

  • 0

I have a file containing some diaeresis marks, ̈. I need to replace them with \textdiaeresis, for use in TeX.

The usual commands which seem to work with other symbols always causes the output to be \\textdiaeresis or \ extdiaeresis, the later, where \t is interpreted to mean “tab”.

I have tried these sed commands:

sed -i 's/\ ̈/\textdiaeresis /g' ./file.txt
sed -i 's/\ ̈/\\textdiaeresis /g' ./file.txt
sed -i 's/\ ̈/\\\textdiaeresis /g' ./file.txt
sed -i "s/\ ̈/\textdiaeresis /g" ./file.txt
sed -i "s/\ ̈/\\textdiaeresis /g" ./file.txt
sed -i "s/\ ̈/\\\textdiaeresis /g" ./file.txt

I have tried these nawk commands:

nawk '{sub(/ ̈/,"\textdiaeresis"); print}' file.txt > file.txt2
cp file.txt2 file.txt
nawk '{sub(/ ̈/,"\\textdiaeresis"); print}' file.txt > file.txt2
cp file.txt2 file.txt
nawk '{sub(/ ̈/,"\\\textdiaeresis"); print}' file.txt > file.txt2
cp file.txt2 file.txt

How can I replace a diaeresis with this TeX code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:37:11+00:00Added an answer on June 9, 2026 at 9:37 pm

    On Mac OS X 10.7.4, under bash (version 3.2.48), I find no problem with sed (which is the Mac OS X sed, not the GNU sed).

    $ x="s, ̈. "
    $ echo "$x" | ~/src/sbcs2utf8/utf8-unicode
    (standard input):
    0x73 = U+0073
    0x2C = U+002C
    0x20 = U+0020
    0xCC 0x88 = U+0308
    0x2E = U+002E
    0x20 = U+0020
    0x0A = U+000A
    $ echo "$x" | sed 's/ ̈/\\textdiaresis/'
    s,\textdiaresis. 
    $
    

    The character is U+0308 COMBINING DIAERESIS; I copied the fragment assigned to x from the question. The Unicode standard specifies (Chapter 2, §2.11):

    In the Unicode Standard, all combining characters are to be used in sequence following the
    base characters to which they apply. The sequence of Unicode characters U+0061 “a”
    LATIN SMALL LETTER A, U+0308 “ ¨ ”combining diaeresis, U+0075 “u” LATIN SMALL LETTER U unambiguously represents “äu” and not “aü”.

    Thus, the diaeresis in the question text should be rendered over the space. Using Firefox (14.0.1), in the shell output, the diaeresis is shown over the . following it, which is wrong. And in the sed command, the diaeresis appears to be combined with the following slash, which is also wrong. Oh well! But the translation via sed looks correct to me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a file containing some escaped parens, how can I replace all
I have a small namespace containing some type definitions, which I use to make
I have a file containing some lines of code followed by a string pattern.
I have a file containing some data (for example, 00927E2B112DB958......). This data is a
Suppose I have a file containing some lines: line 1 ... line 2 ...
Today i have a little problem containing a File Upload. First some Infos: Rubyversion:
I have a CSV file containing some user data it looks like this: 10333,,an.10,Kenyata,,Aaron,,,,,,,,,,
Imagine I have an input file,an output file and a file containing some elisp
I'm messing around in Ruby some more. I have a file containing a class
I need to clean up some file containing French text. Problem is that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.