如何更改UTF文件的情况下, [英] How to change case of UTF file
问题描述
您好
我有大写的UTF文件,我想改变这一切的话小写。
Hello I have UTF file in uppercase and I want to change all words to lowercase.
我曾尝试:
`$ tr '[:upper:]' '[:lower:]' < input.txt > output.txt`
但只能更改cheracter没有口音。
but that changes only cheracter without accent.
感谢
推荐答案
这是因为默认的字符类只在标准的ASCII,其中不包括大部分国际重音符号的工作。如果你有一组定义的那些字,最简单的方法是简单地由特殊的大写字符添加映射手动特殊小写字符:
This is because the default character classes only work on standard ASCII, which does not include most of the international accented characters. If you have a defined set of those characters, the easiest way would be to simply add the mapping from special uppercase character to special lowercase character manually:
TR'AOU [:上:]''AOU [:降低:]
tr 'ÄÖU[:upper:]' 'äöü[:lower:]'
如果你只有几重音字符,这是可行的。
If you only have a few accented characters, this is workable.
这篇关于如何更改UTF文件的情况下,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!