Andras,

On Apr 13, 2005, at 3:34 PM, BÁRTHÁZI András wrote:
So, then here's a solution:
http://barthazi.hu/decode.pugs

It wasn't heavily tested (euro sign, all the Hungarian letters and some other works), but I think it can work in all possible situations.

Let me start by saying this would be an excellent addition to CGI.pm! And I will gladly give you commit rights to do so. Since I am not familiar with this stuff I would prefer not to do it myself.


However, I would ask that you also include some unit tests to confirm that the code is working in all (or at least as many as possible) cases and does not break anything. And ideally you would be able to devise some kind of test that would avoid the 5 extra reg-exps if they were not needed. It could even be some kind of configuration variable, maybe like this:

use v6;
require CGI;
use_multibyte_encoding();
....

I would also like to see an encode() version of this as well (I know that the current version will not work correctly since the dec2hex hack only handles 0 - 128).

Let me know what you would like to do.

- Stevan

Reply via email to