No subject


Sun Nov 20 20:48:46 GMT 2022


```=0D
Am Di 21. Nov 2017, 06:08:27, ilmari schrieb:=0D
> On 2017-11-21 09:54:01, felix.ostmann at gmail.com wrote:=0D
> > The {extra}{list} enum values are not correct encoded. I use the same=
=0D
> > connection settings for the app itself and all data from the database=
=0D
> > are correctly encoded except this enum.=0D
> >=0D
> >=0D
> > > \dT+=0D
> > ...=0D
> >   steinhaus_main | enum_tasks_status   | enum_tasks_status   | 4=0D
> > |=0D
> > offen         +|=0D
> >                  |                     |                     |=0D
> > |=0D
> > erledigt      +|=0D
> >                  |                     |                     |=0D
> > |=0D
> > zur=C3=83=C2=BCckgestellt |=0D
> > ...=0D
> >=0D
> >=0D
> > $ grep status -C5 Tasks.pm=0D
> > ...=0D
> >   "status",=0D
> >   {=0D
> >     data_type =3D> "enum",=0D
> >     default_value =3D> "offen",=0D
> >     extra =3D> {=0D
> >       custom_type_name =3D> "enum_tasks_status",=0D
> >       list =3D> ["offen", "erledigt", "zur\xFCckgestellt"],=0D
> >     },=0D
> >     is_nullable =3D> 0,=0D
> >   },=0D
> > ...=0D
> >=0D
> > the file is in utf8 with use utf8; in the beginning so i expected:=0D=

> >=0D
> > list =3D> ["offen", "erledigt", "zur=C3=83=C2=BCckgestellt"],=0D
> =0D
> These representations of the string are equivalent:=0D
> =0D
> $ perl -Mutf8 -E 'say "zur\xFCckgestellt" eq "zur=C3=83=C2=BCckgestellt=
"'=0D
> 1=0D
> =0D
> Schema::Loader uses Data::Dump to serialise method call arguments in=0D=

> the generated files, and it encodes all non-ASCII (and non-printable)=0D=

> characters using \x notation.=0D
> =0D
> For aesthetic reasons it might be desirable to output Unicode word=0D
> characters literally too, but the current output is not incorrect.=0D
> =0D
> - ilmari=0D
=0D
It is not really the same ...=0D
=0D
In the real code i have to make a Encode::decode('ISO-8859-15', $enum) as=
 a quickfix. =0D
=0D
$ cat ticket123698.pl =0D
use utf8;=0D
use 5.20.0;=0D
use Data::Dumper;=0D
say "zur\xFCckgestellt" eq "zur=C3=83=C2=BCckgestellt";=0D
print Dumper("zur\xFCckgestellt","zur=C3=83=C2=BCckgestellt");=0D
$ perl ticket123698.pl =0D
1=0D
$VAR1 =3D 'zur=C3=AF=C2=BF=C2=BDckgestellt';=0D
$VAR2 =3D "zur\x{fc}ckgestellt";=0D
```=0D
=0D


More information about the DBIx-Class-Devel mailing list