gflohr / libintl-perl

Official repository for libintl-perl
http://www.guido-flohr.net/en/projects/#libintl-perl
GNU General Public License v3.0
5 stars 4 forks source link

Switch of UTF-8 Flag Before Using `Encode::from_to()` #12

Open gflohr opened 1 year ago

gflohr commented 1 year ago

The method Locale::RecodeData::Encode::_recode() calls Encode::from_to() which requires its first argument to have the utf-8 flag switched off. Historically that was possible by the bytes pragma but that no longer works. Instead, switch the flag off explicitely.

Otherwise, the method throws an exception "Wide character /include/path/Locale/RecodeData/_Encode line 46".

Also check for other occurences of the bytes pragma which is now deprecated.