2011/11/25 Alex Povolotsky <[email protected]>:
> On 11/25/11 18:13, Alexey Shrub wrote:
>>
>> http://stackoverflow.com/questions/576095/how-can-i-decode-html-entities
>>
>> так?
>
> ПОЧТИ.
>
> Почему-то
>
> perl -MHTML::Entities -e 'while(<>) { print
> HTML::Entities::decode_entities($_); }' importcouponweb >
> importcouponweb.xml
>

видимо нехватает
binmode(STDOUT, ":encoding(UTF-8)"); # или просто :utf-8 чтоб без конверта

> ругается на wide character in print, выдает нечто, что less показывает, как
> текстовый файл, а emacs (внезапно) - как \символы, и пишет предупреждение -
>
> Warning (emacs): File contents detected as raw-text.
>  Consider adding an encoding attribute to the xml declaration,
>  or saving as utf-8, as mandated by the xml specification.

а здесь возможно дело в BOM
https://en.wikipedia.org/wiki/Byte_order_mark

-- 
Sergiy Borodych
-- 
Moscow.pm mailing list
[email protected] | http://moscow.pm.org

Ответить