Question: I need to decode:

```
file://localhost/G:/test/%E6%B0%97%E3%81%BE%E3%81%90%E3%82%8C%E3%83%AD%E3%83%9E%E3%83%B3%E3%83%86%E3%82%A3%E3%83%83%E3%82%AF.mp3

```

into

```
file://localhost/G:/test/気まぐれロマンティック.mp3

```

How to do it in Delphi prior 2009 (I use Delphi 2006) ?

Answer: 
The Indy TIdURI class in IdURI unit contains UrlDecode / UrlEncode functions. You could try it with a recent version (10.5.8) of Indy, which has encoding parameters:

```
class function TIdURI.URLDecode(ASrc: string; AByteEncoding: TIdTextEncoding = nil
  {$IFDEF STRING_IS_ANSI}; ADestEncoding: TIdTextEncoding = nil{$ENDIF}
  ): string; 

```
mjn may be correct, but I would strongly advise that if you are going to be handling any kind of Unicode within Delphi, try to persuade your bosses to upgrade to the latest version of Delphi (or just Delphi 2009). The Unicode support in Delphi 2009 is very good, and just works out of the box. If you really cant do this, the [TNT components](http://www.axolot.com/TNT/) worked for us but in the end we just waited for Delphi 2009 to come out because it was so much simpler to have it out of the box from Borland.