有没有办法突出显示所有特别的重音字符在崇高的文本或任何其他文本编辑器? [英] is there a way to highlight all the special accent characters in sublime text or any other text editor?

查看:145
本文介绍了有没有办法突出显示所有特别的重音字符在崇高的文本或任何其他文本编辑器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Sublime文本中的HTML编码特殊字符将所有特殊字符转换为HTML代码。我在文件的不同部分有很多重音字符。所以,如果我可以选择所有的特殊字符,然后使用插件一次转换就好了!



是否有正则表达式可以帮助选择所有特殊字符只有?

解决方案



崇高的文字支持正则表达式您可以选择所有非ASCII(代码点> 128)字符。这个正则表达式找到应该足够了:

  [^ \x00-\x7F] 

只需搜索和替换。



但是,如果您正在手工进行HTML编码首先你做错了。将文件保存为UTF-8编码(Sublime Text 2 default),并确保您的Web服务器也将这些文件发送为UTF-8。没有转换,编码或任何需要。


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?

解决方案

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.

这篇关于有没有办法突出显示所有特别的重音字符在崇高的文本或任何其他文本编辑器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆