in reply to How to encode and decode chinese string to iso-8859-1 encoding format

why I can not encode and decode Chinese characters in iso-8859-1 encoding format but I can convert it just fine without any problems on utf8 format
...ahem, but because utf8 covers 1,112,064 codepoints, while iso-8859-1 only 255 and can barely handle European repertoire? You could make Perl let you know you are trying a dubious thing:
use utf8;
use Encode;
encode( 'ISO-8859-1' , '這是一個測試', Encode::FB_CROAK );

...

"\x{9019}" does not map to iso-8859-1 at ...
  • Comment on Re: How to encode and decode chinese string to iso-8859-1 encoding format

Replies are listed 'Best First'.
Re^2: How to encode and decode chinese string to iso-8859-1 encoding format
by thanos1983 (Parson) on Nov 11, 2017 at 08:19 UTC

    Hello vr,

    Nice idea, to use the croak. It will be very usefull for modifications.

    Thanks again for your time and effort reading and replying to my question.

    ~

    BR / Thanos

    Seeking for Perl wisdom...on the process of learning...not there...yet!