Bug#839593: cme: support (or switch to) UTF-8 encoding
On Tuesday, 4 October 2016 11:28:19 CEST Jonas Smedegaard wrote: > Are you aware of "perldoc perlunicook"? Yes, I found this page while ersearching the issue shown by gregoa. I'll use section ℞ 13 to fix this issue. > That documentation helped me get straight which options controlled which > pats of the Unicode maze. Indeed, perl doc regarding unicode is excellent. Thanks for the hint. All the best -- https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/ http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org
Bug#839593: cme: support (or switch to) UTF-8 encoding
On Tue, 04 Oct 2016 10:20:40 +0200, Dominique Dumont wrote: > > % cme modify dpkg-control 'source Uploaders:.insort("María Prueba > >")' > > > > and > > > > % perl -MConfig::Model=cme -e 'cme("dpkg-control")->modify("source > > Uploaders:.insort(\"María Prueba \")");' > > > > result in a broken 'í', which gets mangled into 'Ã', probably because > > perl's default encoding is still latin1. > > You're right. > > According to perlrun(1), you can run also cme this way : > $ perl -C A -S cme modify dpkg-control '...' Ack. > I'll tweak cme upstream to assume that @ARGV is utf8. I'll assume that > everybody use utf8 (even outside of Debian) until a bug report proves me > wrong. Thanks, sounds good to me. > There's nothing I can do with the 2nd form you propose. Even with a > one-liner, > you writing a script and you have to inform perl that you are using utf8 in > the script. Sure, I just wanted to try a different option :) Cheers, gregor -- .''`. Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Tom Waits: Swordfish Trombone signature.asc Description: Digital Signature
Bug#839593: cme: support (or switch to) UTF-8 encoding
Quoting Dominique Dumont (2016-10-04 10:20:40) > On Sunday, 2 October 2016 16:18:38 CEST you wrote: > > Both > > > > % cme modify dpkg-control 'source Uploaders:.insort("María Prueba > >")' > > > > and > > > > % perl -MConfig::Model=cme -e 'cme("dpkg-control")->modify("source > > Uploaders:.insort(\"María Prueba \")");' > > > > result in a broken 'í', which gets mangled into 'Ã', probably because > > perl's default encoding is still latin1. > > You're right. > > According to perlrun(1), you can run also cme this way : > $ perl -C A -S cme modify dpkg-control '...' > > I'll tweak cme upstream to assume that @ARGV is utf8. I'll assume that > everybody use utf8 (even outside of Debian) until a bug report proves me > wrong. > > There's nothing I can do with the 2nd form you propose. Even with a > one-liner, > you writing a script and you have to inform perl that you are using utf8 in > the script. I see no other way that the one you found: > > > The following works for me: > > > > % perl -Mutf8 -MConfig::Model=cme -e 'cme("dpkg-control")->modify("source > > Uploaders:.insort(\"María Prueba \")");' > > > > (also with utf8::all but apparently utf8 is enough). Are you aware of "perldoc perlunicook"? That documentation helped me get straight which options controlled which pats of the Unicode maze. - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private signature.asc Description: signature
Bug#839593: cme: support (or switch to) UTF-8 encoding
On Sunday, 2 October 2016 16:18:38 CEST you wrote: > Both > > % cme modify dpkg-control 'source Uploaders:.insort("María Prueba >")' > > and > > % perl -MConfig::Model=cme -e 'cme("dpkg-control")->modify("source > Uploaders:.insort(\"María Prueba \")");' > > result in a broken 'í', which gets mangled into 'Ã', probably because > perl's default encoding is still latin1. You're right. According to perlrun(1), you can run also cme this way : $ perl -C A -S cme modify dpkg-control '...' I'll tweak cme upstream to assume that @ARGV is utf8. I'll assume that everybody use utf8 (even outside of Debian) until a bug report proves me wrong. There's nothing I can do with the 2nd form you propose. Even with a one-liner, you writing a script and you have to inform perl that you are using utf8 in the script. I see no other way that the one you found: > The following works for me: > > % perl -Mutf8 -MConfig::Model=cme -e 'cme("dpkg-control")->modify("source > Uploaders:.insort(\"María Prueba \")");' > > (also with utf8::all but apparently utf8 is enough). All the best -- https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/ http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org
Bug#839593: cme: support (or switch to) UTF-8 encoding
Package: cme Version: 1.014-1 Severity: wishlist -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 I just tried to help someone to add themselves to Uploaders programmatically; unfortunately their first name contains a non-ascii character (the following is a test name, just the 'í' is taken from the real one). Both % cme modify dpkg-control 'source Uploaders:.insort("María Prueba")' and % perl -MConfig::Model=cme -e 'cme("dpkg-control")->modify("source Uploaders:.insort(\"María Prueba \")");' result in a broken 'í', which gets mangled into 'Ã', probably because perl's default encoding is still latin1. The following works for me: % perl -Mutf8 -MConfig::Model=cme -e 'cme("dpkg-control")->modify("source Uploaders:.insort(\"María Prueba \")");' (also with utf8::all but apparently utf8 is enough). IIRC, files in debian/ should be UTF-8 encoded, so I think it would make sense to assume UTF-8 as the default encoding, or at least add a switch to cme(1) or read the encoding from the terminal or something like this. Cheers, gregor -BEGIN PGP SIGNATURE- iQJ8BAEBCgBmBQJX8Rc+XxSAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREMUUxMzE2RTkzQTc2MEE4MTA0RDg1RkFC QjNBNjgwMTg2NDlBQTA2AAoJELs6aAGGSaoGqrIP/2cOm0SWq0M+ABmWLXIUj0rx 2IwceeaBVbfBlOTUbBR7GkkBkD80cnHQmJ9nI3t+RKwcK6Ey8hGLtvMqQLbiRaBg Bg/zdlXsIac5YkDIU6/pLjnt3Kez8PWfQlvX8OkZmshXMjTq7XMycBN3UcBGgKnn bqy8d+OhD3NlC6a/QElZ/4wa0uyUc+obYlXiEyHxfD7rUn4v0UwSlXC9vygylt0u aVU49kgUWFZvy1ePcGpyrXdg2/Rk50KN+rxD+b/xJNTHOdUu5F80/EdKUWhfz1T7 SmND40RPEdtf3PVxIXoEDky1bRBZVkBWnD5u8eEVNCKfyOBNV+Osg32iJcBe3I9V BTWCTdeX5Z+P9n7ZPqOAGG1Js2cAEabl0aJNZjHZ4ph8o1p+RtP63cIA2LiP3oFC CX3RJmmjuYlnhGJZepsqSMmZ8D7ccFOHguKJ4l/0VEfVHV2Xtc3BL2QIHxE1PCIU UW9j4YeLA7MI8PYwLfzm7eHMZJ/B+fPQvX2px8lzdJ/xn5rNdhUNtZvBZ5mk7SQS /2tWrh5VT5RUk9MuSrOcVKFRgoYyG+x0eDn5MJJvfRuSyFGN2dqWRg/oXANOBTWQ BF7h+QTvWaJlWEhFUW71E3PWeyif0LWsePLRCSOQmvwZggr1MaEqaoOnyaSoLD06 epMa2oGBZYa19YSF+VSu =LNEo -END PGP SIGNATURE-