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 1011785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:50:45+00:00 2026-05-16T09:50:45+00:00

I have a file, and some lines contain unicode characters with diacritical marks in

  • 0

I have a file, and some lines contain unicode characters with diacritical marks in them.
I would like to delete all lines in the file that contain any unicode diacritical accent character (unicode 0x0300 – unicode 0x0362).

I can blow away pretty much any other unicode in the file as range matches like the following function fine:

:g/[{ctrl-v}u0129-{ctrl-v}u0229]/d

But for some reason when the range is in the diacritical range, the diacriticals apply to the range brackets, so I end up with square brackets with accents that dont match anything.

I can however match them one at a time like :g/{ctrl-v}u0301/d, but I’d rather not go through 100 or so iterations to make sure I get them all.

Additionally inverse searches are failing me too. :g/[^ -~]/d will delete every line that contains a character other than those in the range of {space} to tilde, except lines with diacriticals.

Thanks

  • 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-05-16T09:50:46+00:00Added an answer on May 16, 2026 at 9:50 am

    I think that there is some bug in vim: collections does not match diacritics. You can use alternatives as a workaround:

    execute 'g/\('.join(map(range(0x0300, 0x0362), 'printf("\\%%u%04x", v:val)'), '\|').'\)/d'
    

    or

    execute 'g/\('.join(map(range(0x0300, 0x0362), 'nr2char(v:val)'), '\|').'\)/d'
    

    should do what you want.

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

Sidebar

Related Questions

I have a text file and I want to remove some lines that contain
I have a file in UTF-8, where some lines contain the U+2028 Line Separator
I have a plain text file looking like this: some text containing line breaks
I have a command line executable that alters some bits in a file that
I have a file that apparently contains some sort of dump of a keep-alive
I have a file which is an XML representation of some data that is
There is a data file and some image files that I have to download
I have an ASP.NET web service which does some heavy lifting, like say,some file
I have a simple WPF (XAML) file that has some animated shapes and text.
I have a script file containing 1000 lines of data and some of 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.