Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a way to highlight all the special accent characters in sublime text or any other text editor?

I a using the the HTML encode special characters in Sublime text to convert all the special character into their HTML code. I have a lot of accented characters in different parts of the file. So, it would be great if I could select all the special character and then use the plugin to convert all at once!

Is there a regex that helps select all special characters only?

like image 698
kashive Avatar asked Dec 20 '12 16:12

kashive


People also ask

How do you show special characters in Sublime Text?

Is there a way to tell Sublime Text to display all Characters? In Notepad++, clicking View > Show Symbol > Show All Characters produces the following: Spaces are materialized with dots. TABs are materialized with right arrows.

How do I change all instances of words in Sublime Text?

Alt+F3 gives a really simple way to do find and replace: Use it to select all occurrences of the current word or selection, then just start typing to replace or edit them all at once.

How do I select all in Sublime Text?

On Windows/Linux press Alt + F3 .

How do you edit multiple lines in Sublime Text?

Alternatively you can select lines and go to SELECTION MENU >> SPLIT INTO LINES. Now you can edit multiple lines, move cursors etc. for all selected lines.


1 Answers

Yes.

Sublime text supports regular expression and you can select all non-ASCII (code point > 128) characters. This regex find should be enough for you:

[^\x00-\x7F] 

Just search and replace.

But if you are doing manual HTML encode in the first place you are doing it wrong. Save your files as UTF-8 encoding (Sublime Text 2 default) and make sure your web server also sends out those files as UTF-8. No conversion, encoding or anything needed.

like image 162
Mikko Ohtamaa Avatar answered Sep 22 '22 10:09

Mikko Ohtamaa