[TxMt] keep it in iso-8859-1
Hans-Jörg Bibiko
bibiko at eva.mpg.de
Sat Mar 31 15:46:36 UTC 2007
Hi,
I have a tiny problem with that. Maybe caused by an other version of
iconv??
On 31.03.2007, at 17:10, Allan Odgaard wrote:
> On 30. Mar 2007, at 19:09, Jay Soffian wrote:
>
>> On Mar 30, 2007, at 10:58 AM, Danny Krøger wrote:
>>
>> __CFUSERTEXT_ENCODING=0×1F5:0×8000100:0×8000100 /usr/bin/pbpaste
>> | /usr/bin/iconv -c -s -f UTF-8 -t ISO-8859-1
>>
>> Then use that command for pasting instead of cmd-v.
>> Caution: that will silently discard characters which cannot be
>> converted. If you want to do better (say, by replacing them with
>> '?) you'll need to install GNU iconv (MacPorts, Fink, etc).
>
>
> ...
> So the command could read:
>
> __CFUSERTEXT_ENCODING=0×1F5:0×8000100:0×8000100 /usr/bin/pbpaste \
> | /usr/bin/iconv -c -s -f UTF-8 -t ISO-8859-1//TRANSLIT \
> | /usr/bin/iconv -f ISO-8859-1 -t UTF-8
>
The point here is that even characters which could be converted, like
'ö', will discard.
If you want to copy from Word, let's say 'ör ‚tås’', this command
only will insert 'r ts' although 'ö' and 'å' are defined in Latin 1
and ‚tås’ should be replaced by '.
On the other hand, for non-Latin 1 characters it will show a '?'.
Fine, but if you want find/replace all '?' in a document - well, this
could be very tricky.
Best,
Hans
More information about the textmate
mailing list