Skip Menu |

This queue is for tickets about the Config-Std CPAN distribution.

Report information
The Basics
Id: 121956
Status: rejected
Priority: 0/
Queue: Config-Std

People
Owner: Nobody in particular
Requestors: rch [...] skynet.be
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 61555_Feature request Config::Std;
Date: Thu, 1 Jun 2017 14:16:59 +0200
To: bug-config-std [...] rt.cpan.org
From: rch <rch [...] skynet.be>
=============================================== Bruxelles 2017_06_01 Dear Bill Ricker and Tom Metro I'm a happy user of Config::Std. Just hit a snag. I would like to use Pilcrows (¶) in the keys of my configuration variables So I prepare a config hash thusly … $config_hash{"pilcrows"}{"¶REFSQLITE¶"} = "61446", $config_hash{"pilcrows"}{"¶LOCALNMBR¶"} = "01", $config_hash{"pilcrows"}{"¶FILENAME¶"} = "résumé_casta", … And then do write_config(%config_hash => $outfile); But in that $outfile the "¶"s have all been replaced by "�". It reads … [pilcrows] �REFSQLITE�: 61446 �LOCALNMBR�: 01 �FILENAME�: résumé_casta … This looks like I am in Unicode hell. Is there any way out? Yours sincerely / Vriendelijke groeten Richard Hardwick =============================================== email rch@skynet.be =============================================== Show quoted text
-------- End of Original Message --------
Subject: Re: [rt.cpan.org #121956] Update
Date: Thu, 1 Jun 2017 19:14:41 +0200
To: bug-Config-Std [...] rt.cpan.org
From: rch <rch [...] skynet.be>
Update It was indeed a Unicode-Hell problem caused by //use encoding "utf8";// I've now got a working script [1,2] Sorry to have troubled you Richard H [1] Alternative 1 of 2 now works But FAILS if preceeded by //use encoding "utf8";// my %config_hash; $config_hash{"pilcrows"}{"¶LOCALNMBR¶"} = "01"; $config_hash{"pilcrows"}{"¶FILENAME¶"} = "résumé_casta"; ... write_config(%config_hash => $file); [2] Alternative 2 of 2 works with or without //use encoding "utf8";// Dont ask me why ... my %config_hash= ( 'pilcrows' => { '¶LOCALNMBR¶' => '01', '¶FILENAME¶' => "résumé_casta", ... }, ); write_config(%config_hash => $file); --
On Thu Jun 01 13:14:59 2017, rch@skynet.be wrote: Show quoted text
> It was indeed a Unicode-Hell problem
How very strange, but strange is what Unicode does. I can't fathom how that change in syntax in [2] changes whether it works or not either! Since it's working for you now and I can't figure out a fix, I'll close the ticket, but thank you for a very interesting and well documented report. // Bill