[TxMt] Finding UTF-8 characters

Allan Odgaard throw-away-1 at macromates.com
Fri Aug 24 16:09:41 UTC 2007


On Aug 15, 2007, at 9:43 AM, Tobias Jung wrote:

> Hello,
>
> a quote from the release notes from REVISION 1401:
>>  When TextMate bumps your encoding to UTF-8 it will first display  
>> a confirmation dialog (there is no help in finding which  
>> characters cause a problem though, but a bundle command can be  
>> devised)
>
> Is there already such a bundle command anywhere?

No -- but if you look at the Transliterate to ASCII (Text bundle) you  
could use that, but your desired encoding instead of ASCII, and then  
diff the result with the current buffer, that should then point out  
where iconv had to transliterate.

If the encoding you save to is always the same, you probably could  
also do a regexp search for characters not in that encoding -- I say  
probably because e.g. for latin-1 it is easy, for MacRoman it is a  
pretty complex regexp.





More information about the textmate mailing list