Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
July 26, 2003 error in URI module | ||||
---|---|---|---|---|
| ||||
The decode() function in the URI module crashes when I try to decode non-english characters. urldecode() in the urllib works though, so I had to use that one instead. That's all. |
July 26, 2003 Re: error in URI module | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mårten Ask | Can you provide a test case? I'd like to fix this. -Walter "Mårten Ask" <majbritt37@hotmail.com> wrote in message news:bfu6h0$l0$1@digitaldaemon.com... > The decode() function in the URI module crashes when I try to decode > non-english characters. urldecode() in the urllib works though, so I had to > use that one instead. > > That's all. > > |
July 26, 2003 Re: error in URI module | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Well, I tried it again with this code: import uri; void main() { char[] path = "/file.exe?name=M%E5rten%20Ask"; printf(uri.decode(path)); } which should print: /file.exe?name=Mårten Ask but all I get is "Error: URI error". I have no clue why it isn't working. "Walter" <walter@digitalmars.com> skrev i meddelandet news:bfu79a$189$1@digitaldaemon.com... > Can you provide a test case? I'd like to fix this. -Walter > |
July 26, 2003 Re: error in URI module | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mårten Ask | Thanks, I can take it from here. -Walter "Mårten Ask" <majbritt37@hotmail.com> wrote in message news:bfu8kl$2i1$1@digitaldaemon.com... > Well, I tried it again with this code: > > import uri; > > void main() > { > char[] path = "/file.exe?name=M%E5rten%20Ask"; > printf(uri.decode(path)); > } > > which should print: > > /file.exe?name=Mårten Ask > > but all I get is "Error: URI error". I have no clue why it isn't working. > > > "Walter" <walter@digitalmars.com> skrev i meddelandet news:bfu79a$189$1@digitaldaemon.com... > > Can you provide a test case? I'd like to fix this. -Walter > > > > |
August 10, 2003 Re: error in URI module | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mårten Ask | "Mårten Ask" <majbritt37@hotmail.com> wrote in message news:bfu8kl$2i1$1@digitaldaemon.com... > Well, I tried it again with this code: > > import uri; > > void main() > { > char[] path = "/file.exe?name=M%E5rten%20Ask"; > printf(uri.decode(path)); > } > > which should print: > > /file.exe?name=Mårten Ask > > but all I get is "Error: URI error". I have no clue why it isn't working. The error is caused by %E5 being the start of a UTF-8 sequence, but 'r' is not a valid continuation. All continuations for UTF-8 sequences have bit 7 set to 1. |
Copyright © 1999-2021 by the D Language Foundation