On some occasions I use to code html pages with Romanian special characters. Unlike with the German special characters (ä etc.) I feel better to use the standardized entities for Romanian characters in the form ă etc.
In TextMate I could not find out yet how to convert a text selection with Romanian special characters typed so that only the special characters are converted to entities. In my page *every* single character is replaced by its entity and makes the text illegible.
Where is the solution I missed in the manual?
On 30/12/2005, at 14.29, Christian Alexander Mueller wrote:
In TextMate I could not find out yet how to convert a text selection with Romanian special characters typed so that only the special characters are converted to entities.[...]
This is a bit off-topic but... why convert them to entities in the first place?
-- Sune.
On 30/12/2005, at 14:29, Christian Alexander Mueller wrote:
Where is the solution I missed in the manual?
http://macromates.com/textmate/manual/commands.html
You can convert non-ASCII characters to numeric entities e.g. from Ruby:
ruby -KU -pe 'gsub(/[^\x00-\x7F]/) { |m| "&##{m.unpack("U")};" }'